Changeset View
Changeset View
Standalone View
Standalone View
src/util/system.cpp
Show First 20 Lines • Show All 936 Lines • ▼ Show 20 Lines | for (const std::pair<std::string, std::string> &option : options) { | ||||
if (InterpretNegatedOption(strKey, strValue)) { | if (InterpretNegatedOption(strKey, strValue)) { | ||||
m_config_args[strKey].clear(); | m_config_args[strKey].clear(); | ||||
} else { | } else { | ||||
m_config_args[strKey].push_back(strValue); | m_config_args[strKey].push_back(strValue); | ||||
} | } | ||||
// Check that the arg is known | // Check that the arg is known | ||||
if (!IsArgKnown(strKey) && !ignore_invalid_keys) { | if (!IsArgKnown(strKey)) { | ||||
if (!ignore_invalid_keys) { | |||||
error = strprintf("Invalid configuration value %s", | error = strprintf("Invalid configuration value %s", | ||||
option.first.c_str()); | option.first.c_str()); | ||||
return false; | return false; | ||||
} else { | |||||
LogPrintf("Ignoring unknown configuration value %s\n", | |||||
option.first); | |||||
} | |||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
bool ArgsManager::ReadConfigFiles(std::string &error, | bool ArgsManager::ReadConfigFiles(std::string &error, | ||||
bool ignore_invalid_keys) { | bool ignore_invalid_keys) { | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 415 Lines • Show Last 20 Lines |