diff --git a/gui/filelist.cpp b/gui/filelist.cpp index dd5fc26fd..31a5c9940 100644 --- a/gui/filelist.cpp +++ b/gui/filelist.cpp @@ -126,9 +126,11 @@ QStringList FileList::applyExcludeList() const QStringList paths; for (const QFileInfo& item : mFileList) { - QString name = QDir::fromNativeSeparators(item.canonicalFilePath()); - if (!pathMatch.match(name.toStdString())) - paths << name; + if (pathMatch.match(QDir::fromNativeSeparators(item.filePath()).toStdString())) + continue; + QString canonical = QDir::fromNativeSeparators(item.canonicalFilePath()); + if (!pathMatch.match(canonical.toStdString())) + paths << canonical; } return paths; }