File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,10 @@ void Config::Load(json config)
8787 Save ();
8888 }
8989
90+ // If there are migrated settings, write them to disk before processing arguments.
91+ if (!config.empty ())
92+ Save ();
93+
9094 // Process `--websocket_port` override
9195 QString portArgument = Utils::Platform::GetCommandLineArgument (CMDLINE_WEBSOCKET_PORT);
9296 if (portArgument != " " ) {
@@ -141,7 +145,9 @@ void Config::Save()
141145 config[PARAM_PASSWORD] = ServerPassword;
142146 }
143147
144- if (!Utils::Json::SetJsonFileContent (configFilePath, config))
148+ if (Utils::Json::SetJsonFileContent (configFilePath, config))
149+ blog (LOG_DEBUG, " [Config::Save] Saved config." );
150+ else
145151 blog (LOG_ERROR, " [Config::Save] Failed to write config file!" );
146152}
147153
You can’t perform that action at this time.
0 commit comments