aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs/ExportInstanceDialog.cpp
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-07-17 16:55:26 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-07-17 16:55:26 +0300
commit64041a84a2da2d0ba07d6eb663ff7cbc3b351b7b (patch)
tree060c3cbf648820312418eeeaad76039babee51c7 /launcher/ui/dialogs/ExportInstanceDialog.cpp
parent78ee63af388ec53871cd3505a64a5d2059dbb922 (diff)
downloadPrismLauncher-64041a84a2da2d0ba07d6eb663ff7cbc3b351b7b.tar.gz
PrismLauncher-64041a84a2da2d0ba07d6eb663ff7cbc3b351b7b.tar.bz2
PrismLauncher-64041a84a2da2d0ba07d6eb663ff7cbc3b351b7b.zip
handle file removal in ExportToZipTask
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/ui/dialogs/ExportInstanceDialog.cpp')
-rw-r--r--launcher/ui/dialogs/ExportInstanceDialog.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/launcher/ui/dialogs/ExportInstanceDialog.cpp b/launcher/ui/dialogs/ExportInstanceDialog.cpp
index 1a3f8cd4..d1a69b93 100644
--- a/launcher/ui/dialogs/ExportInstanceDialog.cpp
+++ b/launcher/ui/dialogs/ExportInstanceDialog.cpp
@@ -146,11 +146,8 @@ void ExportInstanceDialog::doExport()
auto task = makeShared<MMCZip::ExportToZipTask>(output, m_instance->instanceRoot(), files, "", true);
- connect(task.get(), &Task::failed, this, [this, output](QString reason) {
- CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show();
- QFile::remove(output);
- });
- connect(task.get(), &Task::aborted, this, [output] { QFile::remove(output); });
+ connect(task.get(), &Task::failed, this,
+ [this, output](QString reason) { CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show(); });
connect(task.get(), &Task::finished, this, [task] { task->deleteLater(); });
ProgressDialog progress(this);