about summary refs log tree commit homepage
path: root/lib/mogilefs/http_file.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-11-14 10:57:43 +0000
committerEric Wong <normalperson@yhbt.net>2011-11-14 10:58:50 +0000
commit52a19f3c4ed9da852eac809276d7f64fe4defbef (patch)
tree10bb6d2b24680511db6325b0e35dd7cd9f80987a /lib/mogilefs/http_file.rb
parent754b8077b55e37627c32d1339227001d509d8517 (diff)
downloadmogilefs-client-52a19f3c4ed9da852eac809276d7f64fe4defbef.tar.gz
As it turns out, the previous change was wrong since we have to
reopen it anyways as "upload" is called in a loop.  Attempting
to rewind @active is still a good error-check, though.

This reverts commit 754b8077b55e37627c32d1339227001d509d8517.
Diffstat (limited to 'lib/mogilefs/http_file.rb')
-rw-r--r--lib/mogilefs/http_file.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mogilefs/http_file.rb b/lib/mogilefs/http_file.rb
index 064447f..96e9887 100644
--- a/lib/mogilefs/http_file.rb
+++ b/lib/mogilefs/http_file.rb
@@ -91,7 +91,7 @@ class MogileFS::HTTPFile < StringIO
       file_size = put_streaming_io(sock, uri)
     elsif @big_io
       if String === @big_io || @big_io.respond_to?(:to_path)
-        file ||= File.open(@big_io)
+        file = File.open(@big_io)
         stat = file.stat
         file_size = request_put(sock, uri, stat.file? ? stat.size : nil, file)
       else