diff options
author | Marcel Molina <marcel@vernix.org> | 2005-10-11 01:06:05 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2005-10-11 01:06:05 +0000 |
commit | 9025e5d47ff82951a78c5ca90bca77e4cd3b5bef (patch) | |
tree | 30c84d39bd285774b5ecd6230e7d111854bdba53 /actionpack/lib | |
parent | 064842f516513eab305cb8a3257e32164cda68cb (diff) | |
download | rails-9025e5d47ff82951a78c5ca90bca77e4cd3b5bef.tar.gz rails-9025e5d47ff82951a78c5ca90bca77e4cd3b5bef.tar.bz2 rails-9025e5d47ff82951a78c5ca90bca77e4cd3b5bef.zip |
Make cacheing binary files friendly with Windows. Closes #1975.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2524 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index d31343dd71..7afdef135d 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -86,7 +86,7 @@ module ActionController #:nodoc: benchmark "Cached page: #{page_cache_file(path)}" do FileUtils.makedirs(File.dirname(page_cache_path(path))) - File.open(page_cache_path(path), "w+") { |f| f.write(content) } + File.open(page_cache_path(path), "wb+") { |f| f.write(content) } end end @@ -407,7 +407,7 @@ module ActionController #:nodoc: def write(name, value, options = nil) #:nodoc: ensure_cache_path(File.dirname(real_file_path(name))) - File.open(real_file_path(name), "w+") { |f| f.write(value) } + File.open(real_file_path(name), "wb+") { |f| f.write(value) } rescue => e Base.logger.error "Couldn't create cache directory: #{name} (#{e.message})" if Base.logger end |