Fixed an issue where the home directory was not expanded for the staticpath find rule.

This commit is contained in:
Leon Styhre 2021-06-23 17:49:47 +02:00
parent 0e8b0bd7ae
commit f25980f43b

View file

@ -1143,6 +1143,10 @@ std::string FileData::findEmulatorPath(std::string& command)
}
for (std::string path : emulatorStaticPaths) {
path = Utils::FileSystem::expandHomePath(path);
#if defined(_WIN64)
path = Utils::String::replace(path, "/", "\\");
#endif
if (Utils::FileSystem::isRegularFile(path) ||
Utils::FileSystem::isSymlink(path)) {
command.replace(0, endPos + 1, path);