Commit 4f11fa0d authored by Max Kellermann's avatar Max Kellermann

config/File: allow overriding top-level settings in includes

Remove the error message and instead erase the old setting if the "repeatable" flag is not set. https://github.com/MusicPlayerDaemon/MPD/issues/684
parent ce7ec2b3
ver 0.21.19 (not yet released) ver 0.21.19 (not yet released)
* configuration
- allow overriding top-level settings in includes
* output * output
- pulse: obey Pulse's maximum sample rate (fixes DSD128 playback) - pulse: obey Pulse's maximum sample rate (fixes DSD128 playback)
* fix build failure with clang 10 * fix build failure with clang 10
......
...@@ -153,11 +153,9 @@ ReadConfigParam(ConfigData &config_data, BufferedReader &reader, ...@@ -153,11 +153,9 @@ ReadConfigParam(ConfigData &config_data, BufferedReader &reader,
name, reader.GetLineNumber()); name, reader.GetLineNumber());
if (!option.repeatable) if (!option.repeatable)
if (const auto *param = config_data.GetParam(o)) /* if the option is not repeatable, override the old
throw FormatRuntimeError("config parameter \"%s\" is first defined " value by removing it first */
"on line %d and redefined on line %u\n", config_data.GetParamList(o).clear();
name, param->line,
reader.GetLineNumber());
/* now parse the block or the value */ /* now parse the block or the value */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment