diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-08-06 17:22:58 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-08-06 17:25:32 -0500 |
commit | c6b7d0f34472ee7ef03d602c8923fd0ba8dab833 (patch) | |
tree | a3ab0c7716f259182268ee69038b7009f55c13f5 /activesupport/lib/active_support | |
parent | 165120a606577dd81fe1a267899c4415fe25f1fb (diff) | |
download | rails-c6b7d0f34472ee7ef03d602c8923fd0ba8dab833.tar.gz rails-c6b7d0f34472ee7ef03d602c8923fd0ba8dab833.tar.bz2 rails-c6b7d0f34472ee7ef03d602c8923fd0ba8dab833.zip |
Ensure file atomic write uses the cache directory as its tmp folder
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/cache/file_store.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 0bdca49388..7b6ca39091 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -15,7 +15,7 @@ module ActiveSupport def write(name, value, options = nil) super ensure_cache_path(File.dirname(real_file_path(name))) - File.atomic_write(real_file_path(name)) { |f| f.write(value) } + File.atomic_write(real_file_path(name), cache_path) { |f| f.write(value) } rescue => e RAILS_DEFAULT_LOGGER.error "Couldn't create cache directory: #{name} (#{e.message})" if RAILS_DEFAULT_LOGGER end |