mirror of
https://github.com/Lime3DS/Lime3DS
synced 2025-01-09 13:43:27 +00:00
Fixed shortcut creation failing if icons directory structure doesn't already exist
This commit is contained in:
parent
b97e2f3d70
commit
1447c481c7
1 changed files with 2 additions and 2 deletions
|
@ -1902,10 +1902,10 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi
|
||||||
out_icon_path = FileUtil::GetUserPath(FileUtil::UserPath::IconsDir);
|
out_icon_path = FileUtil::GetUserPath(FileUtil::UserPath::IconsDir);
|
||||||
ico_extension = "ico";
|
ico_extension = "ico";
|
||||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||||
out_icon_path = FileUtil::GetUserDirectory("XDG_DATA_HOME") + "/icons/hicolor/256x256";
|
out_icon_path = FileUtil::GetUserDirectory("XDG_DATA_HOME") + "/icons/hicolor/256x256/";
|
||||||
#endif
|
#endif
|
||||||
// Create icons directory if it doesn't exist
|
// Create icons directory if it doesn't exist
|
||||||
if (!FileUtil::CreateDir(out_icon_path.string())) {
|
if (!FileUtil::CreateFullPath(out_icon_path.string())) {
|
||||||
QMessageBox::critical(
|
QMessageBox::critical(
|
||||||
this, tr("Create Icon"),
|
this, tr("Create Icon"),
|
||||||
tr("Cannot create icon file. Path \"%1\" does not exist and cannot be created.")
|
tr("Cannot create icon file. Path \"%1\" does not exist and cannot be created.")
|
||||||
|
|
Loading…
Reference in a new issue