aboutsummaryrefslogtreecommitdiff
path: root/src/util/settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/settings.cpp')
-rw-r--r--src/util/settings.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util/settings.cpp b/src/util/settings.cpp
index 34894e994e..b92b1d30c3 100644
--- a/src/util/settings.cpp
+++ b/src/util/settings.cpp
@@ -13,12 +13,13 @@ namespace {
enum class Source {
FORCED,
COMMAND_LINE,
+ RW_SETTINGS,
CONFIG_FILE_NETWORK_SECTION,
CONFIG_FILE_DEFAULT_SECTION
};
//! Merge settings from multiple sources in precedence order:
-//! Forced config > command line > config file network-specific section > config file default section
+//! Forced config > command line > read-write settings file > config file network-specific section > config file default section
//!
//! This function is provided with a callback function fn that contains
//! specific logic for how to merge the sources.
@@ -33,6 +34,10 @@ static void MergeSettings(const Settings& settings, const std::string& section,
if (auto* values = FindKey(settings.command_line_options, name)) {
fn(SettingsSpan(*values), Source::COMMAND_LINE);
}
+ // Merge in the read-write settings
+ if (const SettingsValue* value = FindKey(settings.rw_settings, name)) {
+ fn(SettingsSpan(*value), Source::RW_SETTINGS);
+ }
// Merge in the network-specific section of the config file
if (!section.empty()) {
if (auto* map = FindKey(settings.ro_config, section)) {