mirror of
https://github.com/ceph/ceph
synced 2024-12-18 17:37:38 +00:00
Merge pull request #13350 from Jing-Scott/fix-swift-ver-error-code
rgw: fix error code of inexistence of versions location in swift api Reviewed-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
This commit is contained in:
commit
a785b00be3
@ -6157,11 +6157,14 @@ int RGWRados::swift_versioning_copy(RGWObjectCtx& obj_ctx,
|
||||
r = get_bucket_info(obj_ctx, bucket_info.bucket.tenant, bucket_info.swift_ver_location, dest_bucket_info, NULL, NULL);
|
||||
if (r < 0) {
|
||||
ldout(cct, 10) << "failed to read dest bucket info: r=" << r << dendl;
|
||||
if (r == -ENOENT) {
|
||||
return -ERR_PRECONDITION_FAILED;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
if (dest_bucket_info.owner != bucket_info.owner) {
|
||||
return -EPERM;
|
||||
return -ERR_PRECONDITION_FAILED;
|
||||
}
|
||||
|
||||
rgw_obj dest_obj(dest_bucket_info.bucket, buf);
|
||||
|
Loading…
Reference in New Issue
Block a user