1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

M #-: fix minor bug in S3 upload (#267)

This commit is contained in:
Alejandro Huertas Herrero 2020-09-29 16:54:08 +02:00 committed by GitHub
parent bc70f194c7
commit ae8008e78f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,10 +111,17 @@ end
cmd = "#{UTILS_PATH}/downloader.sh #{import_source} -"
Open3.popen3(cmd) do |_, o, _, _|
Open3.popen3(cmd) do |_, o, e, _|
body = o.read(read_length)
if o.eof?
error = Thread.new { e.read }.value
unless error.empty?
STDERR.puts error
exit 1
end
s3.put_object(body)
else
s3.create_multipart_upload