summaryrefslogtreecommitdiffstats
path: root/application/MainWindow.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-06-10 00:46:45 +0200
committerPetr Mrázek <peterix@gmail.com>2015-06-10 00:46:45 +0200
commit88f5c8d347a3f32802eb2f770d61369988ed9570 (patch)
tree7906b01943b81c95936616d3bce01e09ca518ddd /application/MainWindow.cpp
parent15b7c3039a41eab75f5dcabab53de82372d2ecfa (diff)
downloadMultiMC-88f5c8d347a3f32802eb2f770d61369988ed9570.tar
MultiMC-88f5c8d347a3f32802eb2f770d61369988ed9570.tar.gz
MultiMC-88f5c8d347a3f32802eb2f770d61369988ed9570.tar.lz
MultiMC-88f5c8d347a3f32802eb2f770d61369988ed9570.tar.xz
MultiMC-88f5c8d347a3f32802eb2f770d61369988ed9570.zip
GH-1060 create and delete update dir
Diffstat (limited to 'application/MainWindow.cpp')
-rw-r--r--application/MainWindow.cpp4
1 files changed, 4 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))