This commit is contained in:
parent
38f5374e49
commit
0741e307cc
@ -78,8 +78,8 @@ auto get_directory_files(std::string_view path, bool oldest_first,
|
|||||||
try {
|
try {
|
||||||
struct dirent *de{};
|
struct dirent *de{};
|
||||||
while ((de = readdir(root)) != nullptr) {
|
while ((de = readdir(root)) != nullptr) {
|
||||||
|
std::string name{de->d_name};
|
||||||
if (de->d_type == DT_DIR) {
|
if (de->d_type == DT_DIR) {
|
||||||
std::string name{de->d_name};
|
|
||||||
if (name == "." || name == ".." || not recursive) {
|
if (name == "." || name == ".." || not recursive) {
|
||||||
continue;
|
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) {
|
const auto add_to_lookup = [&](const std::string &lookup_path) {
|
||||||
if (lookup.find(lookup_path) == lookup.end()) {
|
if (lookup.find(lookup_path) == lookup.end()) {
|
||||||
struct stat st{};
|
struct stat st {};
|
||||||
stat(lookup_path.c_str(), &st);
|
stat(lookup_path.c_str(), &st);
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
lookup[lookup_path] =
|
lookup[lookup_path] =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user