App updater download directory path cehecking and selection

This commit is contained in:
David Kocik 2023-01-20 08:40:54 +01:00
parent 77c521eabb
commit 3f69799047
4 changed files with 35 additions and 10 deletions

View file

@ -3374,6 +3374,10 @@ void GUI_App::app_updater(bool from_user)
if (dialog_result != wxID_OK) {
return;
}
if (dwnld_dlg.get_download_path().parent_path().empty() || !boost::filesystem::exists(dwnld_dlg.get_download_path().parent_path())) {
show_error(nullptr,GUI::format_wxstr(_L("Download can't proceed. Target directory doesn't exists: %1%"), dwnld_dlg.get_download_path().parent_path().string()));
return;
}
app_data.target_path =dwnld_dlg.get_download_path();
// start download