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:
parent
d5678ee86a
commit
6f0b06ddd9
1 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue