mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-17 22:58:06 +02:00
Removed special case handling for !(showDirectories || showFiles)
The special case is not necessary for correctness. It would help performance in theory, but it seems very unlikely that any code would request a directory scan when it interested in neither the subdirs nor the files in that directory.
This commit is contained in:
parent
46c64ea984
commit
2c76ddae50
@ -83,7 +83,6 @@ void FileLister::browse(const string& path, bool clean)
|
|||||||
directories.clear();
|
directories.clear();
|
||||||
files.clear();
|
files.clear();
|
||||||
|
|
||||||
if (showDirectories || showFiles) {
|
|
||||||
DIR *dirp;
|
DIR *dirp;
|
||||||
string slashedPath = path;
|
string slashedPath = path;
|
||||||
if (path[path.length() - 1] != '/')
|
if (path[path.length() - 1] != '/')
|
||||||
@ -158,7 +157,6 @@ void FileLister::browse(const string& path, bool clean)
|
|||||||
}
|
}
|
||||||
|
|
||||||
closedir(dirp);
|
closedir(dirp);
|
||||||
}
|
|
||||||
|
|
||||||
moveNames(move(directorySet), directories);
|
moveNames(move(directorySet), directories);
|
||||||
moveNames(move(fileSet), files);
|
moveNames(move(fileSet), files);
|
||||||
|
Loading…
Reference in New Issue
Block a user