rgw/swift: don't crash on nonexistent bucket in BulkUpload

Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Casey Bodley 2022-01-17 14:45:28 -05:00
parent d05bd30436
commit a6611a55cc

View File

@ -7389,9 +7389,10 @@ int RGWBulkUploadOp::handle_file(const std::string_view path,
ACLOwner bowner;
op_ret = store->get_bucket(this, s->user.get(), rgw_bucket(rgw_bucket_key(s->user->get_tenant(), bucket_name)), &bucket, y);
if (op_ret == -ENOENT) {
ldpp_dout(this, 20) << "non existent directory=" << bucket_name << dendl;
} else if (op_ret < 0) {
if (op_ret < 0) {
if (op_ret == -ENOENT) {
ldpp_dout(this, 20) << "non existent directory=" << bucket_name << dendl;
}
return op_ret;
}