diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-11-21 00:05:33 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-11-21 00:05:33 +0000 |
commit | fbf389f5e1bb0742726e8b3923074a72c410db10 (patch) | |
tree | d99b10733761ae6b821f6891b67dcf5a8037b421 | |
parent | d3c08764deb3345c5bdc34b35d2dd2a2d8a4771e (diff) | |
download | mogilefs-client-fbf389f5e1bb0742726e8b3923074a72c410db10.tar.gz |
Tempfile.open works differently, there.
-rw-r--r-- | examples/mogstored_rack.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/mogstored_rack.rb b/examples/mogstored_rack.rb index d5b0fa7..caa779a 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([File.basename(path), ".tmp"], dir) do |tmp| tmp = tmp.to_io # delegated method calls are slower tmp.sync = true tmp.binmode @@ -94,7 +94,7 @@ class MogstoredRack fsync(dir, tmp) if @fsync resp = r(201) resp[1]["X-Received-Content-MD5"] = received - resp + return resp end end |