mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 09:35:39 +00:00
(Linux) Fixed a .desktop file parsing issue where escaped % characters were not handled correctly.
This commit is contained in:
parent
9d06c33af6
commit
c80e81c2dc
|
@ -1440,6 +1440,9 @@ void FileData::launchGame()
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (isShortcut) {
|
if (isShortcut) {
|
||||||
|
// Note that the following is not an attempt to implement the entire FreeDesktop standard
|
||||||
|
// for .desktop files, for example argument parsing is not really usable in this context.
|
||||||
|
// There's essentially only enough functionality here to be able to run games and emulators.
|
||||||
if (Utils::FileSystem::exists(Utils::String::replace(romPath, "\\", "")) &&
|
if (Utils::FileSystem::exists(Utils::String::replace(romPath, "\\", "")) &&
|
||||||
!Utils::FileSystem::isDirectory(Utils::String::replace(romPath, "\\", ""))) {
|
!Utils::FileSystem::isDirectory(Utils::String::replace(romPath, "\\", ""))) {
|
||||||
LOG(LogInfo) << "Parsing desktop file \"" << Utils::String::replace(romPath, "\\", "")
|
LOG(LogInfo) << "Parsing desktop file \"" << Utils::String::replace(romPath, "\\", "")
|
||||||
|
@ -1464,6 +1467,7 @@ void FileData::launchGame()
|
||||||
romPath = Utils::String::replace(romPath, "%f", "");
|
romPath = Utils::String::replace(romPath, "%f", "");
|
||||||
romPath = Utils::String::replace(romPath, "%U", "");
|
romPath = Utils::String::replace(romPath, "%U", "");
|
||||||
romPath = Utils::String::replace(romPath, "%u", "");
|
romPath = Utils::String::replace(romPath, "%u", "");
|
||||||
|
romPath = Utils::String::replace(romPath, "%%", "%");
|
||||||
romPath = Utils::String::trim(romPath);
|
romPath = Utils::String::trim(romPath);
|
||||||
command = Utils::String::replace(command, binaryPath, "");
|
command = Utils::String::replace(command, binaryPath, "");
|
||||||
execEntry = true;
|
execEntry = true;
|
||||||
|
|
Loading…
Reference in a new issue