From 54f4e7d4a534448293c74612f8140cf34b9cf9f8 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 a1732da82a30..d2804e573434 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -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) -- 2.47.3