BUGFIX: sometimes we have stringio, it has no close

This commit is contained in:
Sam
2014-05-27 10:08:03 +10:00
committed by Sam Saffron
parent 6c1c8be794
commit a864f8aefd
+2 -1
View File
@@ -18,7 +18,8 @@ class FileHelper
while f.size <= max_file_size && data = downloaded.read(max_file_size)
f.write(data)
end
downloaded.close!
# tiny files are StringIO, no close! on them
downloaded.close! if downloaded.respond_to? :close!
end
tmp