refactor
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
This commit is contained in:
parent
0741e307cc
commit
7d9db55d5d
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user