refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2024-11-30 17:41:49 -06:00
parent 6da5d9f4f0
commit e1939d4d11

View File

@ -661,10 +661,6 @@ auto s3_provider::get_used_drive_space_impl() const -> std::uint64_t {
return total_size;
}
const auto cfg = get_config().get_s3_config();
const auto is_encrypted = not cfg.encryption_token.empty();
auto node_list = doc.select_nodes("/ListBucketResult/Contents");
grab_more = doc.select_node("/ListBucketResult/IsTruncated")
.node()
.text()
@ -676,6 +672,10 @@ auto s3_provider::get_used_drive_space_impl() const -> std::uint64_t {
.as_string();
}
const auto cfg = get_config().get_s3_config();
const auto is_encrypted = not cfg.encryption_token.empty();
auto node_list = doc.select_nodes("/ListBucketResult/Contents");
total_size = std::accumulate(
node_list.begin(), node_list.end(), total_size,
[&is_encrypted](std::uint64_t total, auto node) -> std::uint64_t {