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

[AWS|storage] fix for versioned copy_object

This commit is contained in:
geemus 2012-02-08 12:19:36 -06:00
parent d5678ee86a
commit 6f0b06ddd9

View file

@ -62,13 +62,11 @@ module Fog
if source_object && target_bucket
response.status = 200
target_object = source_object.dup
target_object.each do |version|
version.merge!({'Key' => target_object_name})
end
target_bucket[:objects][target_object_name] = target_object
target_object.merge!({'Key' => target_object_name})
target_bucket[:objects][target_object_name] = [target_object]
response.body = {
'ETag' => target_object.last['ETag'],
'LastModified' => Time.parse(target_object.last['Last-Modified'])
'ETag' => target_object['ETag'],
'LastModified' => Time.parse(target_object['Last-Modified'])
}
else
response.status = 404