GUI: better exclude of files. the canonical Qt method might return absolute paths from relative input paths.

This commit is contained in:
Daniel Marjamäki 2022-11-19 14:11:40 +01:00
parent 80aa6dc1d9
commit 50241224d0
1 changed files with 5 additions and 3 deletions

View File

@ -126,9 +126,11 @@ QStringList FileList::applyExcludeList() const
QStringList paths; QStringList paths;
for (const QFileInfo& item : mFileList) { for (const QFileInfo& item : mFileList) {
QString name = QDir::fromNativeSeparators(item.canonicalFilePath()); if (pathMatch.match(QDir::fromNativeSeparators(item.filePath()).toStdString()))
if (!pathMatch.match(name.toStdString())) continue;
paths << name; QString canonical = QDir::fromNativeSeparators(item.canonicalFilePath());
if (!pathMatch.match(canonical.toStdString()))
paths << canonical;
} }
return paths; return paths;
} }