]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Use attrs from source bucket on copy 4745/head
authorJavier M. Mellid <jmunhoz@igalia.com>
Fri, 15 May 2015 12:22:29 +0000 (14:22 +0200)
committerJavier M. Mellid <jmunhoz@igalia.com>
Fri, 22 May 2015 07:41:01 +0000 (09:41 +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>
src/rgw/rgw_op.cc

index 35c27d8edbb716fe8602a28995dd4db967ccdaf6..dbe5e1cb233901f0eb9ab85e982a63c51f5d55d1 100644 (file)
@@ -2305,6 +2305,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)