]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Use attrs from source bucket on copy 4762/head
authorJavier M. Mellid <jmunhoz@igalia.com>
Fri, 15 May 2015 12:22:29 +0000 (14:22 +0200)
committerNathan Cutler <ncutler@suse.com>
Tue, 26 May 2015 11:56:44 +0000 (13:56 +0200)
On copy objects, when bucket source is the same as the destination, use attrs
from source bucket.

Fixes: #11639
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
(cherry picked from commit 1dac80df1d4a2364154ed8b404d13609936c257b)

src/rgw/rgw_op.cc

index cc557d8b5d5e80d9947405a5c6709916d9252644..f8b90f6bd2ba019948c14503b7d9d0a1ad972cb9 100644 (file)
@@ -2070,6 +2070,7 @@ int RGWCopyObj::verify_permission()
 
   if (src_bucket_name.compare(dest_bucket_name) == 0) { /* will only happen if s->local_source */
     dest_bucket_info = src_bucket_info;
+    dest_attrs = src_attrs;
   } else {
     ret = store->get_bucket_info(s->obj_ctx, dest_bucket_name, dest_bucket_info, NULL, &dest_attrs);
     if (ret < 0)