GH-1060 create and delete update dir

This commit is contained in:
Petr Mrázek
2015-06-10 00:46:45 +02:00
parent 15b7c3039a
commit 88f5c8d347
2 changed files with 6 additions and 0 deletions

View File

@ -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))