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 <jmunhoz@igalia.com>
This commit is contained in:
Javier M. Mellid 2015-05-15 14:22:29 +02:00
parent e63c44b253
commit 1dac80df1d

View 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)