To test determine the default -datadir by following:
https://github.com/bitcoin/bitcoin/blob/08bd21a3bda9f621948c535e951880d7e318caa5/src/util/system.cpp#L687-L690
Then, for instance, on linux:
# create a file with that path:
touch ~/.bitcoin
# launch daemon:
src/bitcoind
Without this PR:
EXCEPTION: N5boost10filesystem16filesystem_errorE
boost::filesystem::create_directory: File exists: "..."
bitcoin in AppInit()
Assertion failed: (globalChainBaseParams), function BaseParams, file chainparamsbase.cpp, line 30.