1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[AWS|Glacier] fix 1.9.2 fallback

This commit is contained in:
Frederick Cheung 2012-09-02 12:28:09 +01:00
parent 3c0f47f377
commit bbb348281e

View file

@ -72,7 +72,7 @@ module Fog
else
old_encoding = body.encoding
body.force_encoding('BINARY')
digests_for_part = chunk_count.times.collect {|chunk_index| Digest::SHA256.digest(body.byteslice(chunk_index * MEGABYTE, MEGABYTE))}
digests_for_part = chunk_count.times.collect {|chunk_index| Digest::SHA256.digest(body.slice(chunk_index * MEGABYTE, MEGABYTE))}
body.force_encoding(old_encoding)
end
reduce_digests(digests_for_part)