Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make atomic_write() puts the check_file in the cache dir, not in appl…
…ication

root [#1962 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information
brunetton authored and josh committed Feb 20, 2009
1 parent f8ea9f8 commit 3668a64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/core_ext/file/atomic.rb
Expand Up @@ -27,7 +27,7 @@ def atomic_write(file_name, temp_dir = Dir.tmpdir)
old_stat = stat(file_name)
rescue Errno::ENOENT
# No old permissions, write a temp file to determine the defaults
check_name = ".permissions_check.#{Thread.current.object_id}.#{Process.pid}.#{rand(1000000)}"
check_name = join(dirname(file_name), ".permissions_check.#{Thread.current.object_id}.#{Process.pid}.#{rand(1000000)}")
open(check_name, "w") { }
old_stat = stat(check_name)
unlink(check_name)
Expand Down

0 comments on commit 3668a64

Please sign in to comment.