refactor
This commit is contained in:
parent
b9fe2746e3
commit
4e86f2a7de
@ -561,9 +561,9 @@ auto s3_provider::get_file_list(api_file_list &list, std::string &marker) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
pugi::xml_document doc;
|
pugi::xml_document doc;
|
||||||
auto res = doc.load_string(response_data.c_str());
|
auto result = doc.load_string(response_data.c_str());
|
||||||
if (res.status != pugi::xml_parse_status::status_ok) {
|
if (result.status != pugi::xml_parse_status::status_ok) {
|
||||||
utils::error::raise_error(function_name, res.status,
|
utils::error::raise_error(function_name, result.status,
|
||||||
"failed to parse xml document");
|
"failed to parse xml document");
|
||||||
return api_error::comm_error;
|
return api_error::comm_error;
|
||||||
}
|
}
|
||||||
@ -588,9 +588,9 @@ auto s3_provider::get_file_list(api_file_list &list, std::string &marker) const
|
|||||||
|
|
||||||
auto is_encrypted = not get_s3_config().encryption_token.empty();
|
auto is_encrypted = not get_s3_config().encryption_token.empty();
|
||||||
if (is_encrypted) {
|
if (is_encrypted) {
|
||||||
auto err = decrypt_object_name(api_path);
|
auto res = decrypt_object_name(api_path);
|
||||||
if (err != api_error::success) {
|
if (res != api_error::success) {
|
||||||
return err;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -608,9 +608,9 @@ auto s3_provider::get_file_list(api_file_list &list, std::string &marker) const
|
|||||||
size)
|
size)
|
||||||
: size;
|
: size;
|
||||||
file.key = is_encrypted ? utils::path::create_api_path(object_name) : "";
|
file.key = is_encrypted ? utils::path::create_api_path(object_name) : "";
|
||||||
auto err = add_if_not_found(file, file.key);
|
auto res = add_if_not_found(file, file.key);
|
||||||
if (err != api_error::success) {
|
if (res != api_error::success) {
|
||||||
return err;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
list.push_back(std::move(file));
|
list.push_back(std::move(file));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user