1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-09-30 05:37:36 +03: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:
Maarten ter Huurne 2014-08-13 07:08:04 +02:00
parent 46c64ea984
commit 2c76ddae50

View File

@ -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);