mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-26 09:39:55 +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:
parent
9737810bcb
commit
6d44fb3a75
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user