refactor
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
Scott E. Graves 2024-10-31 16:50:29 -05:00
parent 0741e307cc
commit 7d9db55d5d

View File

@ -74,12 +74,12 @@ auto get_directory_files(std::string_view path, bool oldest_first,
} }
#else // !defined(_WIN32) #else // !defined(_WIN32)
auto *root = opendir(abs_path.c_str()); auto *root = opendir(abs_path.c_str());
if (root) { if (root != nullptr) {
try { try {
struct dirent *de{}; struct dirent *entry{};
while ((de = readdir(root)) != nullptr) { while ((entry = readdir(root)) != nullptr) {
std::string name{de->d_name}; std::string name{entry->d_name};
if (de->d_type == DT_DIR) { if (entry->d_type == DT_DIR) {
if (name == "." || name == ".." || not recursive) { if (name == "." || name == ".." || not recursive) {
continue; continue;
} }