Skip to content

Commit

Permalink
[AWS|storage] fix for versioned copy_object
Browse files Browse the repository at this point in the history
  • Loading branch information
geemus committed Feb 8, 2012
1 parent d5678ee commit 6f0b06d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/fog/aws/requests/storage/copy_object.rb
Expand Up @@ -62,13 +62,11 @@ def copy_object(source_bucket_name, source_object_name, target_bucket_name, targ
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
Expand Down

0 comments on commit 6f0b06d

Please sign in to comment.