mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
config: Always write config when migrating
Fixes an issue where OBS 30.1.2 migrations would work on the first 30.2.0 load, but the settings would not persist to disk for further loads.
This commit is contained in:
parent
7e3f2a82f0
commit
6c9fd55c63
@ -87,6 +87,10 @@ void Config::Load(json config)
|
||||
Save();
|
||||
}
|
||||
|
||||
// If there are migrated settings, write them to disk before processing arguments.
|
||||
if (!config.empty())
|
||||
Save();
|
||||
|
||||
// Process `--websocket_port` override
|
||||
QString portArgument = Utils::Platform::GetCommandLineArgument(CMDLINE_WEBSOCKET_PORT);
|
||||
if (portArgument != "") {
|
||||
@ -141,7 +145,9 @@ void Config::Save()
|
||||
config[PARAM_PASSWORD] = ServerPassword;
|
||||
}
|
||||
|
||||
if (!Utils::Json::SetJsonFileContent(configFilePath, config))
|
||||
if (Utils::Json::SetJsonFileContent(configFilePath, config))
|
||||
blog(LOG_DEBUG, "[Config::Save] Saved config.");
|
||||
else
|
||||
blog(LOG_ERROR, "[Config::Save] Failed to write config file!");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user