mirror of
https://github.com/discourse/discourse.git
synced 2025-01-30 06:28:03 +08:00
BUGFIX: sometimes we have stringio, it has no close
This commit is contained in:
parent
6c1c8be794
commit
a864f8aefd
|
@ -18,7 +18,8 @@ class FileHelper
|
||||||
while f.size <= max_file_size && data = downloaded.read(max_file_size)
|
while f.size <= max_file_size && data = downloaded.read(max_file_size)
|
||||||
f.write(data)
|
f.write(data)
|
||||||
end
|
end
|
||||||
downloaded.close!
|
# tiny files are StringIO, no close! on them
|
||||||
|
downloaded.close! if downloaded.respond_to? :close!
|
||||||
end
|
end
|
||||||
|
|
||||||
tmp
|
tmp
|
||||||
|
|
Loading…
Reference in New Issue
Block a user