From 7d9db55d5d92533b7b7416416c2f88107ed939ca Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Thu, 31 Oct 2024 16:50:29 -0500 Subject: [PATCH] refactor --- repertory/librepertory/src/utils/file_utils.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/repertory/librepertory/src/utils/file_utils.cpp b/repertory/librepertory/src/utils/file_utils.cpp index 029171be..9a4d891f 100644 --- a/repertory/librepertory/src/utils/file_utils.cpp +++ b/repertory/librepertory/src/utils/file_utils.cpp @@ -74,12 +74,12 @@ auto get_directory_files(std::string_view path, bool oldest_first, } #else // !defined(_WIN32) auto *root = opendir(abs_path.c_str()); - if (root) { + if (root != nullptr) { try { - struct dirent *de{}; - while ((de = readdir(root)) != nullptr) { - std::string name{de->d_name}; - if (de->d_type == DT_DIR) { + struct dirent *entry{}; + while ((entry = readdir(root)) != nullptr) { + std::string name{entry->d_name}; + if (entry->d_type == DT_DIR) { if (name == "." || name == ".." || not recursive) { continue; }