mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-26 19:44:16 +01:00
Fixed shortcut creation failing if icons directory structure doesn't already exist
This commit is contained in:
parent
b97e2f3d70
commit
1447c481c7
@ -1902,10 +1902,10 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi
|
||||
out_icon_path = FileUtil::GetUserPath(FileUtil::UserPath::IconsDir);
|
||||
ico_extension = "ico";
|
||||
#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
|
||||
// Create icons directory if it doesn't exist
|
||||
if (!FileUtil::CreateDir(out_icon_path.string())) {
|
||||
if (!FileUtil::CreateFullPath(out_icon_path.string())) {
|
||||
QMessageBox::critical(
|
||||
this, tr("Create Icon"),
|
||||
tr("Cannot create icon file. Path \"%1\" does not exist and cannot be created.")
|
||||
|
Loading…
Reference in New Issue
Block a user