fix: file filtering on modpack export
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
f086233186
commit
147159be2c
8 changed files with 14 additions and 13 deletions
|
@ -418,7 +418,7 @@ bool extractFile(QString fileCompressed, QString file, QString target)
|
|||
return extractRelFile(&zip, file, target);
|
||||
}
|
||||
|
||||
bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFunction excludeFilter)
|
||||
bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFileFunction excludeFilter)
|
||||
{
|
||||
QDir rootDirectory(rootDir);
|
||||
if (!rootDirectory.exists())
|
||||
|
@ -443,8 +443,8 @@ bool collectFileListRecursively(const QString& rootDir, const QString& subDir, Q
|
|||
// collect files
|
||||
entries = directory.entryInfoList(QDir::Files);
|
||||
for (const auto& e : entries) {
|
||||
QString relativeFilePath = rootDirectory.relativeFilePath(e.absoluteFilePath());
|
||||
if (excludeFilter && excludeFilter(relativeFilePath)) {
|
||||
if (excludeFilter && excludeFilter(e)) {
|
||||
QString relativeFilePath = rootDirectory.relativeFilePath(e.absoluteFilePath());
|
||||
qDebug() << "Skipping file " << relativeFilePath;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue