GlosSITarget: Fix freeze if installed in a path that contains spaces

pull/185/head
Peter Repukat 2 years ago
parent 39db77b6c1
commit 0e955c819a

@ -132,7 +132,8 @@ void AppLauncher::launchWatchdog()
GetModuleFileNameA(GetModuleHandle(NULL), buff, MAX_PATH);
const std::string glossipath(buff);
// hack to start a TRULY detached process...
system(("start " + (glossipath.substr(0, 1 + glossipath.find_last_of(L'\\')) + "GlosSIWatchdog.exe")).data());
const auto launchString = ("start /b cmd.exe /c \"" + (glossipath.substr(0, 1 + glossipath.find_last_of(L'\\')) + "GlosSIWatchdog.exe" + "\""));
system(launchString.data());
}
#ifdef _WIN32

Loading…
Cancel
Save