summaryrefslogtreecommitdiffstats
path: root/application/MainWindow.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-11-18 16:04:08 +0100
committerPetr Mrázek <peterix@gmail.com>2016-11-19 22:11:45 +0100
commit69be23c5f629884465dec98efcb9d5a2678b4df5 (patch)
tree9c9135bb995006fac7a6de3b349fe24b325dbe99 /application/MainWindow.cpp
parente974950d48e4e8b9500acbeadf9c1abdab1dec72 (diff)
downloadMultiMC-69be23c5f629884465dec98efcb9d5a2678b4df5.tar
MultiMC-69be23c5f629884465dec98efcb9d5a2678b4df5.tar.gz
MultiMC-69be23c5f629884465dec98efcb9d5a2678b4df5.tar.lz
MultiMC-69be23c5f629884465dec98efcb9d5a2678b4df5.tar.xz
MultiMC-69be23c5f629884465dec98efcb9d5a2678b4df5.zip
GH-1726 better failure detection for updates
Instead of just checking if the new version started, make sure it is able to write its IPC key to a file and then use the key to connect to the process.
Diffstat (limited to 'application/MainWindow.cpp')
-rw-r--r--application/MainWindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index e5ea81f6..4e649521 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -90,6 +90,7 @@
#include "dialogs/ExportInstanceDialog.h"
#include <FolderInstanceProvider.h>
#include <InstanceImportTask.h>
+#include "UpdateController.h"
class MainWindow::Ui
{
@@ -952,7 +953,8 @@ void MainWindow::downloadUpdates(GoUpdate::Status status)
// If the task succeeds, install the updates.
if (updateDlg.execWithTask(&updateTask))
{
- MMC->installUpdates(updateTask.updateFilesDir(), updateTask.operations());
+ UpdateController update(this, MMC->root(), updateTask.updateFilesDir(), updateTask.operations());
+ update.installUpdates();
}
else
{