From 88f5c8d347a3f32802eb2f770d61369988ed9570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 10 Jun 2015 00:46:45 +0200 Subject: GH-1060 create and delete update dir --- application/MainWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'application/MainWindow.cpp') 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)) -- cgit v1.2.3