refactor
This commit is contained in:
parent
cb93e34de0
commit
ff13633962
@ -238,13 +238,14 @@ auto encrypt_provider::get_directory_item_count(
|
|||||||
std::filesystem::directory_iterator(source_path)) {
|
std::filesystem::directory_iterator(source_path)) {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
} catch (const std::exception &ex) {
|
} catch (const std::exception &ex) {
|
||||||
utils::error::raise_error(__FUNCTION__, ex, cfg.path,
|
utils::error::raise_error(__FUNCTION__, ex, cfg.path,
|
||||||
"failed to get directory item count");
|
"failed to get directory item count");
|
||||||
return 0U;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return count;
|
return 0U;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto encrypt_provider::get_directory_items(const std::string &api_path,
|
auto encrypt_provider::get_directory_items(const std::string &api_path,
|
||||||
@ -282,8 +283,8 @@ auto encrypt_provider::get_directory_items(const std::string &api_path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
auto dir_iter = std::filesystem::directory_iterator(source_path);
|
for (const auto &dir_entry :
|
||||||
for (const auto &dir_entry : dir_iter) {
|
std::filesystem::directory_iterator(source_path)) {
|
||||||
try {
|
try {
|
||||||
std::string current_api_path{};
|
std::string current_api_path{};
|
||||||
if (dir_entry.is_directory()) {
|
if (dir_entry.is_directory()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user