FIX:use default download dir when the download path does not exist
Change-Id: Ie1a341caa9803b8cd121fac4fe20c0f3d6fcf3fa
This commit is contained in:
parent
06daf3bc45
commit
0f8672eb99
|
@ -1878,10 +1878,8 @@ void GUI_App::init_download_path()
|
|||
fs::path dp(down_path);
|
||||
if (!fs::exists(dp)) {
|
||||
|
||||
if (!fs::create_directory(dp)) {
|
||||
std::string user_down_path = wxStandardPaths::Get().GetUserDir(wxStandardPaths::Dir_Downloads).ToUTF8().data();
|
||||
app_config->set("download_path", user_down_path);
|
||||
}
|
||||
std::string user_down_path = wxStandardPaths::Get().GetUserDir(wxStandardPaths::Dir_Downloads).ToUTF8().data();
|
||||
app_config->set("download_path", user_down_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue