1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-12-25 21:22:26 +02:00

Use the "*" filter to match all files

The empty "" filter was previously matching all the files; since
a few commits it now matches the files without extensions. The
new "*" filter allows again to match all files.
This commit is contained in:
Paul Cercueil 2013-07-08 02:21:42 -04:00
parent 9737810bcb
commit 6d44fb3a75

View File

@ -80,9 +80,6 @@ void FileLister::browse(bool clean)
return;
}
vector<string> vfilter;
split(vfilter, getFilter(), ",");
string filepath, file;
struct stat st;
struct dirent *dptr;
@ -117,6 +114,13 @@ void FileLister::browse(bool clean)
if (std::find(files.begin(), files.end(), file) != files.end())
continue;
if (filter.compare("*") == 0) {
files.push_back(file);
continue;
}
vector<string> vfilter;
split(vfilter, filter, ",");
for (vector<string>::iterator it = vfilter.begin(); it != vfilter.end(); ++it) {
if (file.find('.') == string::npos) {
if (!it->empty())