]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Use attrs from source bucket on copy 4885/head
authorJavier M. Mellid <jmunhoz@igalia.com>
Fri, 15 May 2015 12:22:29 +0000 (14:22 +0200)
committerAbhishek Lekshmanan <abhishek.lekshmanan@ril.com>
Sun, 7 Jun 2015 07:29:58 +0000 (12:59 +0530)
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 a1732da82a30bad8adff2d99e375b01a7d6a87a1..d2804e57343408795e1174d0a01555b3f45e5187 100644 (file)
@@ -2303,6 +2303,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(obj_ctx, dest_bucket_name, dest_bucket_info, NULL, &dest_attrs);
     if (ret < 0)