GlosSITarget: fix reading config-files with spaces

pull/192/head
Peter Repukat 2 years ago
parent febebafc25
commit 3903f38c0e

@ -126,20 +126,19 @@ inline void Parse(const std::vector<std::wstring>& args)
if (arg.empty()) {
continue;
}
if (arg[0] != L'-') {
configName = std::wstring(arg.begin(), arg.end());
}
if (arg[0] == L'-') {
if (arg == L"-disableuwpoverlay") {
cli.no_uwp_overlay = true;
}
if (arg == L"-disablewatchdog") {
cli.disable_watchdog = true;
}
if (arg == L"-disableuwpoverlay") {
cli.no_uwp_overlay = true;
} else if (arg == L"-disablewatchdog") {
cli.disable_watchdog = true;
} else {
configName += L" " + std::wstring(arg.begin(), arg.end());
}
}
if (!configName.empty()) {
if (configName[0] == L' ') {
configName.erase(configName.begin());
}
if (!configName.ends_with(L".json")) {
configName += L".json";
}

Loading…
Cancel
Save