windows: fix restart with spaces in exe filename

This commit is contained in:
Cvolton 2024-03-25 15:03:23 +01:00
parent 2d13d4f84f
commit 223f168fb0
No known key found for this signature in database

View file

@ -249,7 +249,7 @@ void geode::utils::game::restart() {
wchar_t buffer[MAX_PATH];
GetModuleFileNameW(nullptr, buffer, MAX_PATH);
const auto gdName = ghc::filesystem::path(buffer).filename().string();
const auto gdName = fmt::format("\"{}\"", ghc::filesystem::path(buffer).filename().string());
// launch updater
const auto updaterPath = (workingDir / "GeodeUpdater.exe").string();