From 0ddef973280c7fd11cbb556c20c1c76d066b43a0 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Wed, 18 Feb 2009 22:22:18 -0600 Subject: [PATCH] Fix Caching Problem in 0.16.3 This fixes the caching problem http://golem.ph.utexas.edu/instiki/show/Known+Bugs?rev=13#Caching which afflicts some installations of 0.16.3. With the patch, it's no longer necessary that the Instiki directory be owned by the instiki user (yay!). --- .../activesupport/lib/active_support/core_ext/file/atomic.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/rails/activesupport/lib/active_support/core_ext/file/atomic.rb b/vendor/rails/activesupport/lib/active_support/core_ext/file/atomic.rb index 976d462e..8cc5654a 100644 --- a/vendor/rails/activesupport/lib/active_support/core_ext/file/atomic.rb +++ b/vendor/rails/activesupport/lib/active_support/core_ext/file/atomic.rb @@ -27,7 +27,7 @@ module ActiveSupport #:nodoc: 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)