From 2d5d8da35f627840ee57a8fa071147943b890d0c Mon Sep 17 00:00:00 2001 From: "Javier M. Mellid" Date: Fri, 15 May 2015 14:22:29 +0200 Subject: [PATCH] rgw: Use attrs from source bucket on copy 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 (cherry picked from commit 1dac80df1d4a2364154ed8b404d13609936c257b) --- src/rgw/rgw_op.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index cc557d8b5d5e8..f8b90f6bd2ba0 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -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) -- 2.39.5