refactor
This commit is contained in:
parent
9a1483377c
commit
b20bc6c28a
@ -53,13 +53,14 @@ auto get_directory_files(std::string_view path, bool oldest_first,
|
||||
auto sub_files =
|
||||
get_directory_files(full_path, oldest_first, recursive);
|
||||
ret.insert(ret.end(), sub_files.begin(), sub_files.end());
|
||||
} else {
|
||||
ULARGE_INTEGER li{};
|
||||
li.HighPart = fd.ftLastWriteTime.dwHighDateTime;
|
||||
li.LowPart = fd.ftLastWriteTime.dwLowDateTime;
|
||||
lookup[full_path] = li.QuadPart;
|
||||
ret.emplace_back(full_path);
|
||||
continue;
|
||||
}
|
||||
|
||||
ULARGE_INTEGER li{};
|
||||
li.HighPart = fd.ftLastWriteTime.dwHighDateTime;
|
||||
li.LowPart = fd.ftLastWriteTime.dwLowDateTime;
|
||||
lookup[full_path] = li.QuadPart;
|
||||
ret.emplace_back(full_path);
|
||||
} while (::FindNextFileA(find, &fd) != 0);
|
||||
} catch (const std::exception &e) {
|
||||
utils::error::raise_error(function_name, e,
|
||||
@ -86,9 +87,10 @@ auto get_directory_files(std::string_view path, bool oldest_first,
|
||||
auto sub_files = get_directory_files(
|
||||
utils::path::combine(abs_path, {name}), oldest_first, recursive);
|
||||
ret.insert(ret.end(), sub_files.begin(), sub_files.end());
|
||||
} else {
|
||||
ret.emplace_back(utils::path::combine(abs_path, {name}));
|
||||
continue;
|
||||
}
|
||||
|
||||
ret.emplace_back(utils::path::combine(abs_path, {name}));
|
||||
}
|
||||
} catch (const std::exception &e) {
|
||||
utils::error::raise_error(function_name, e,
|
||||
|
Loading…
x
Reference in New Issue
Block a user