mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-01-16 16:21:02 +00:00
Preserve backwards-compatible argument escaping behavior for executables
This commit is contained in:
parent
6ddc4b7ba3
commit
56da68c863
@ -720,6 +720,13 @@ namespace platf {
|
|||||||
// to try to find it via PATH
|
// to try to find it via PATH
|
||||||
return from_utf8(raw_cmd);
|
return from_utf8(raw_cmd);
|
||||||
}
|
}
|
||||||
|
else if (boost::iequals(extension, L".exe")) {
|
||||||
|
// If the file has an .exe extension, we will bypass the resolution here and
|
||||||
|
// directly pass the unmodified command string to CreateProcess(). The argument
|
||||||
|
// escaping rules are subtly different between CreateProcess() and ShellExecute(),
|
||||||
|
// and we want to preserve backwards compatibility with older configs.
|
||||||
|
return from_utf8(raw_cmd);
|
||||||
|
}
|
||||||
|
|
||||||
// For regular files, the class is found using the file extension (including the dot)
|
// For regular files, the class is found using the file extension (including the dot)
|
||||||
lookup_string = extension;
|
lookup_string = extension;
|
||||||
|
Loading…
Reference in New Issue
Block a user