return nullptr;
}
-int RadosBucket::remove_bucket(const DoutPrefixProvider* dpp, bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y)
+int RadosBucket::remove_bucket(const DoutPrefixProvider* dpp,
+ bool delete_children,
+ std::string prefix,
+ std::string delimiter,
+ bool forward_to_master,
+ req_info* req_info, optional_yield y)
{
int ret;
ListResults results;
- bool is_truncated = false;
do {
results.objs.clear();
- ret = list(dpp, params, 1000, results, y);
- if (ret < 0)
- return ret;
+ ret = list(dpp, params, 1000, results, y);
+ if (ret < 0)
+ return ret;
if (!results.objs.empty() && !delete_children) {
ldpp_dout(dpp, -1) << "ERROR: could not remove non-empty bucket " << info.bucket.name <<
return ret;
}
}
- } while(is_truncated);
+ } while(results.is_truncated);
/* If there's a prefix, then we are aborting multiparts as well */
if (!prefix.empty()) {