This PR introduces a new behavior for -datadir (w/o a value) or -datadir="": it means “use the default one”. It allows to unset a datadir option specified in the config file by passing -datadir or -datadir="" as a command line option.
Credits: This PR is inspired by ryanofsky’s idea:
If somebody has a
datadiroption specified in the config file, but wants to unset it on the command line by passing-nodatadiror-datadir="", it seems like this should be allowed.
The more general approach, however, has been described by ryanofsky here.