GH-1874 Do not allow launching instances during an update

This commit is contained in:
Petr Mrázek
2017-05-02 23:29:47 +02:00
parent 6a8bb3691b
commit 907aa36704
3 changed files with 21 additions and 1 deletions

View File

@ -989,8 +989,14 @@ void MainWindow::downloadUpdates(GoUpdate::Status status)
// If the task succeeds, install the updates.
if (updateDlg.execWithTask(&updateTask))
{
/**
* NOTE: This disables launching instances until the update either succeeds (and this process exits)
* or the update fails (and the control leaves this scope).
*/
MMC->updateIsRunning(true);
UpdateController update(this, MMC->root(), updateTask.updateFilesDir(), updateTask.operations());
update.installUpdates();
MMC->updateIsRunning(false);
}
else
{