From 5a05f8d04cf987ee0ea48a41c175a297b0cc0dc6 Mon Sep 17 00:00:00 2001 From: Jeffrey Hardy Date: Fri, 16 Oct 2009 18:47:01 -0400 Subject: [PATCH] Our default options take precedence --- lib/aws/s3/object.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/aws/s3/object.rb b/lib/aws/s3/object.rb index f9eaf48..a80674a 100644 --- a/lib/aws/s3/object.rb +++ b/lib/aws/s3/object.rb @@ -189,10 +189,10 @@ def copy(key, copy_key, bucket = nil, options = {}) # Updates the object with key 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