public
Fork of rails/rails
Description: Ruby on Rails - forked for implementing I18n patch
Homepage: http://rubyonrails.org
Clone URL: git://github.com/svenfuchs/rails.git
Make sure the permissions check file is closed before being unlinked.

[#1035 state:committed]
NZKoz (author)
Sun Sep 14 00:44:29 -0700 2008
commit  d28c724b4074605445d2834888ad280778f0af6a
tree    2804f2bedec19cb4d5ad91ca534f08bc57a715ae
parent  a17027d13a48e1e64b14a28e7d58e341812f8cb4
...
28
29
30
31
 
32
33
34
...
28
29
30
 
31
32
33
34
0
@@ -28,7 +28,7 @@ module ActiveSupport #:nodoc:
0
           rescue Errno::ENOENT
0
             # No old permissions, write a temp file to determine the defaults
0
             check_name = ".permissions_check.#{Thread.current.object_id}.#{Process.pid}.#{rand(1000000)}"
0
- new(check_name, "w")
0
+ open(check_name, "w") { }
0
             old_stat = stat(check_name)
0
             unlink(check_name)
0
           end

Comments

    No one has commented yet.