mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-25 18:46:55 +01:00
Quote and escape desktop entry executable path (#917)
This commit is contained in:
parent
34ff9da097
commit
7111cbb103
@ -1287,17 +1287,18 @@ void wxGameList::CreateShortcut(GameInfo2& gameInfo) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 'Icon' accepts spaces in file name, does not accept quoted file paths
|
||||||
|
// 'Exec' does not accept non-escaped spaces, and can accept quoted file paths
|
||||||
const auto desktop_entry_string =
|
const auto desktop_entry_string =
|
||||||
fmt::format("[Desktop Entry]\n"
|
fmt::format("[Desktop Entry]\n"
|
||||||
"Name={}\n"
|
"Name={0}\n"
|
||||||
"Comment=Play {} on Cemu\n"
|
"Comment=Play {0} on Cemu\n"
|
||||||
"Exec={} --title-id {:016x}\n"
|
"Exec={1:?} --title-id {2:016x}\n"
|
||||||
"Icon={}\n"
|
"Icon={3}\n"
|
||||||
"Terminal=false\n"
|
"Terminal=false\n"
|
||||||
"Type=Application\n"
|
"Type=Application\n"
|
||||||
"Categories=Game;",
|
"Categories=Game;",
|
||||||
title_name,
|
title_name,
|
||||||
title_name,
|
|
||||||
_pathToUtf8(exe_path),
|
_pathToUtf8(exe_path),
|
||||||
title_id,
|
title_id,
|
||||||
_pathToUtf8(icon_path.value_or("")));
|
_pathToUtf8(icon_path.value_or("")));
|
||||||
@ -1339,4 +1340,4 @@ void wxGameList::CreateShortcut(GameInfo2& gameInfo) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user