}
}
- if (s->bucket_name_str.size()) {
+ if (!s->bucket_name_str.empty()) {
s->bucket_exists = true;
if (s->bucket_instance_id.empty()) {
ret = store->get_bucket_info(s->obj_ctx, s->bucket_name_str, s->bucket_info, NULL, &s->bucket_attrs);
/* we're passed only_bucket = true when we specifically need the bucket's
acls, that happens on write operations */
- if (!only_bucket) {
+ if (!only_bucket && !s->object_str.empty()) {
+ if (!s->bucket_exists) {
+ return -ERR_NO_SUCH_BUCKET;
+ }
s->object_acl = new RGWAccessControlPolicy(s->cct);
obj_str = s->object_str;