Skip to content

Commit

Permalink
Our default options take precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
packagethief committed Oct 16, 2009
1 parent 55c64b6 commit 5a05f8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/aws/s3/object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ def copy(key, copy_key, bucket = nil, options = {})
# Updates the object with <tt>key</tt> by copying it in-place, preserving the ACL of the existing object.
# Useful for updating an object's metadata without having to re-PUT the data.
def update(key, bucket = nil, options = {})
bucket = bucket_name(bucket)
source_key = path!(bucket, key)
bucket = bucket_name(bucket)
source_key = path!(bucket, key)
default_options = {'x-amz-copy-source' => source_key, 'x-amz-metadata-directive' => 'REPLACE'}
returning put(source_key, default_options.merge(options)) do
returning put(source_key, options.merge(default_options)) do
acl(key, bucket, acl(key, bucket))
end
end
Expand Down

0 comments on commit 5a05f8d

Please sign in to comment.