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 =
|
||||
fmt::format("[Desktop Entry]\n"
|
||||
"Name={}\n"
|
||||
"Comment=Play {} on Cemu\n"
|
||||
"Exec={} --title-id {:016x}\n"
|
||||
"Icon={}\n"
|
||||
"Name={0}\n"
|
||||
"Comment=Play {0} on Cemu\n"
|
||||
"Exec={1:?} --title-id {2:016x}\n"
|
||||
"Icon={3}\n"
|
||||
"Terminal=false\n"
|
||||
"Type=Application\n"
|
||||
"Categories=Game;",
|
||||
title_name,
|
||||
title_name,
|
||||
_pathToUtf8(exe_path),
|
||||
title_id,
|
||||
_pathToUtf8(icon_path.value_or("")));
|
||||
|
Loading…
Reference in New Issue
Block a user