Revert "Optimize DirAccessUnix::get_next() for some file systems"
This commit is contained in:
parent
4379395892
commit
ee9f46423b
1 changed files with 10 additions and 14 deletions
|
@ -136,31 +136,27 @@ String DirAccessUnix::get_next() {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//typedef struct stat Stat;
|
||||||
|
struct stat flags;
|
||||||
|
|
||||||
String fname = fix_unicode_name(entry->d_name);
|
String fname = fix_unicode_name(entry->d_name);
|
||||||
|
|
||||||
if (entry->d_type == DT_UNKNOWN) {
|
String f = current_dir.plus_file(fname);
|
||||||
//typedef struct stat Stat;
|
|
||||||
struct stat flags;
|
|
||||||
|
|
||||||
String f = current_dir.plus_file(fname);
|
if (stat(f.utf8().get_data(), &flags) == 0) {
|
||||||
|
|
||||||
if (stat(f.utf8().get_data(), &flags) == 0) {
|
if (S_ISDIR(flags.st_mode)) {
|
||||||
|
|
||||||
if (S_ISDIR(flags.st_mode)) {
|
_cisdir = true;
|
||||||
|
|
||||||
_cisdir = true;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
_cisdir = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
_cisdir = false;
|
_cisdir = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_cisdir = (entry->d_type == DT_DIR);
|
|
||||||
|
_cisdir = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_cishidden = (fname != "." && fname != ".." && fname.begins_with("."));
|
_cishidden = (fname != "." && fname != ".." && fname.begins_with("."));
|
||||||
|
|
Loading…
Reference in a new issue