Opened 8 years ago
Last modified 6 years ago
#3990 new defect
[PATCH] ConfigDB complains about empty strings — at Initial Version
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description
#3979 added the first two config entries that allow to enter strings.
However the current options code throws an error if the user saves an empty string to be used later:
ERROR: Encountered config setting 'playername.singleplayer' without value while parsing 'config/user.cfg' on line 12
Reproduce: Empty the singleplayername, close the dialog, enter the singleplayermenu. Reported by Imarok in irc on 2016-05-16.
It will replace the emptystring automatically with the OS username. But the message is still shown and misleading.
The message was added in r15980.
Adding a default.cfg
entry doesn't influence the appearance of the message.
If default.cfg
contains a non-empty string, the empty string from user.cfg
won't replace it and the message is still shown.
20:51 <@leper> removing it works, but hides the fact that a higher priority config file cannot delete settings by just setting it to ""
It were consistent if the config system wouldn't care whether the given string was empty and just use that if specified (even when passing a comma-separated list).
If a comma separated list is given, the empty strings will be recognized correctly too, even if the list ends with a comma.