summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/MainWindow.cpp4
-rw-r--r--application/MultiMC.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index ad4cbf7a..c595f95f 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -989,6 +989,10 @@ void MainWindow::downloadUpdates(GoUpdate::Status status)
status.rootPath = MMC->rootPath;
auto dlPath = PathCombine(MMC->root(), "update", "XXXXXX");
+ if(!ensureFilePathExists(dlPath))
+ {
+ CustomMessageBox::selectable(this, tr("Error"), tr("Couldn't create folder for update downloads:\n%1").arg(dlPath), QMessageBox::Warning)->show();
+ }
GoUpdate::DownloadTask updateTask(status, dlPath, &updateDlg);
// If the task succeeds, install the updates.
if (updateDlg.exec(&updateTask))
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index 18a819ab..feda6ec3 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -663,6 +663,7 @@ void MultiMC::installUpdates(const QString updateFilesDir, GoUpdate::OperationLi
#endif
QString backupPath = PathCombine(root(), "update", "backup");
+ QDir origin(root());
// clean up the backup folder. it should be empty before we start
if(!deletePath(backupPath))
@@ -773,6 +774,7 @@ void MultiMC::installUpdates(const QString updateFilesDir, GoUpdate::OperationLi
failedOperationType = Start;
goto FAILED;
}
+ origin.rmdir(updateFilesDir);
qApp->quit();
return;