Bugfix: rwconf: Update internal setting when modifying file

Without this, the GUI will re-read the rwconf prune value each load of Settings
This commit is contained in:
Luke Dashjr 2024-03-19 05:01:08 +00:00
parent 73db739d93
commit 7c812c86d4

View File

@ -1014,6 +1014,9 @@ void ArgsManager::ModifyRWConfigFile(const std::map<std::string, std::string>& s
fs::remove(rwconf_new_path);
throw std::ios_base::failure(strprintf("Failed to replace %s", fs::PathToString(rwconf_new_path)));
}
for (const auto& setting_change : settings_to_change) {
m_settings.rw_config[setting_change.first] = {setting_change.second};
}
if (!IsArgNegated("-settings")) {
// Also save to settings.json for Core (0.21+) compatibility
for (const auto& setting_change : settings_to_change) {