aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs/ExportMrPackDialog.cpp
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-07-01 13:05:55 +0100
committerGitHub <noreply@github.com>2023-07-01 13:05:55 +0100
commit7138425c8581e19d36ee62e1193a5b7184eb0089 (patch)
treed29efcad3353603c6ac1eb64708a92e616c00ecc /launcher/ui/dialogs/ExportMrPackDialog.cpp
parent05d2c1f0b06519eba9cc5ad22848106b49f9bd15 (diff)
parentc523765c197cf63d6830d205f1554cd73e38109e (diff)
downloadPrismLauncher-7138425c8581e19d36ee62e1193a5b7184eb0089.tar.gz
PrismLauncher-7138425c8581e19d36ee62e1193a5b7184eb0089.tar.bz2
PrismLauncher-7138425c8581e19d36ee62e1193a5b7184eb0089.zip
Merge branch 'develop' into better-component-installation
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/ui/dialogs/ExportMrPackDialog.cpp')
-rw-r--r--launcher/ui/dialogs/ExportMrPackDialog.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/launcher/ui/dialogs/ExportMrPackDialog.cpp b/launcher/ui/dialogs/ExportMrPackDialog.cpp
index 561b92e4..b302f7ba 100644
--- a/launcher/ui/dialogs/ExportMrPackDialog.cpp
+++ b/launcher/ui/dialogs/ExportMrPackDialog.cpp
@@ -52,8 +52,9 @@ ExportMrPackDialog::ExportMrPackDialog(InstancePtr instance, QWidget* parent)
// use the game root - everything outside cannot be exported
const QDir root(instance->gameRoot());
proxy = new FileIgnoreProxy(instance->gameRoot(), this);
+ proxy->ignoreFilesWithPath().insert({ "logs", "crash-reports" });
+ proxy->ignoreFilesWithName().append({ ".DS_Store", "thumbs.db", "Thumbs.db" });
proxy->setSourceModel(model);
- proxy->setFilterRegularExpression("^(?!\\.DS_Store).+$");
const QDir::Filters filter(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::AllDirs | QDir::Hidden);
@@ -99,7 +100,7 @@ void ExportMrPackDialog::done(int result)
return;
ModrinthPackExportTask task(ui->name->text(), ui->version->text(), ui->summary->text(), instance, output,
- [this](const QString& path) { return proxy->blockedPaths().covers(path); });
+ std::bind(&FileIgnoreProxy::filterFile, proxy, std::placeholders::_1));
connect(&task, &Task::failed,
[this](const QString reason) { CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show(); });