about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-11-20 11:16:30 +0000
committerEric Wong <normalperson@yhbt.net>2011-11-20 11:16:30 +0000
commita73444af13ce8ac9cd94347c627f8191b3a80634 (patch)
tree61d32e07c4d40450e8da9634e4894f54a4720a0b
parent21fc20b7d798c3eab6155b24dcb58c95b53ef856 (diff)
downloadmogilefs-client-a73444af13ce8ac9cd94347c627f8191b3a80634.tar.gz
We always want to use the destination directory as the
temporary directory to avoid cross-device link/rename
attempts.
-rw-r--r--examples/mogstored_rack.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/mogstored_rack.rb b/examples/mogstored_rack.rb
index 0cdfbfb..d5b0fa7 100644
--- a/examples/mogstored_rack.rb
+++ b/examples/mogstored_rack.rb
@@ -75,7 +75,7 @@ class MogstoredRack
     dir = File.dirname(path)
     File.directory?(dir) or return r(403)
 
-    Tempfile.open([dir, "#{File.basename(path)}.tmp"]) do |tmp|
+    Tempfile.open(["#{dir}/", "#{File.basename(path)}.tmp"]) do |tmp|
       tmp = tmp.to_io # delegated method calls are slower
       tmp.sync = true
       tmp.binmode