From 0741e307cc412a2215c86d1dec7866b38f87f13f Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Thu, 31 Oct 2024 16:49:17 -0500 Subject: [PATCH] fix --- repertory/librepertory/src/utils/file_utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repertory/librepertory/src/utils/file_utils.cpp b/repertory/librepertory/src/utils/file_utils.cpp index 1a4c9757..029171be 100644 --- a/repertory/librepertory/src/utils/file_utils.cpp +++ b/repertory/librepertory/src/utils/file_utils.cpp @@ -78,8 +78,8 @@ auto get_directory_files(std::string_view path, bool oldest_first, try { struct dirent *de{}; while ((de = readdir(root)) != nullptr) { + std::string name{de->d_name}; if (de->d_type == DT_DIR) { - std::string name{de->d_name}; if (name == "." || name == ".." || not recursive) { continue; } @@ -101,7 +101,7 @@ auto get_directory_files(std::string_view path, bool oldest_first, const auto add_to_lookup = [&](const std::string &lookup_path) { if (lookup.find(lookup_path) == lookup.end()) { - struct stat st{}; + struct stat st {}; stat(lookup_path.c_str(), &st); #if defined(__APPLE__) lookup[lookup_path] =