From 1dac80df1d4a2364154ed8b404d13609936c257b 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 --- 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 35c27d8edbb7..dbe5e1cb2339 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -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) -- 2.47.3