util: make GetDataDir read-only & create datadir..

.. only in bitcoind and bitcoin-qt

This changes behaviour of GetConfigFilePath which now always returns the
absolute path of the provided -conf argument.
This commit is contained in:
willcl-ark
2023-02-09 19:51:41 +00:00
parent 56e370fbb9
commit 64c105442c
3 changed files with 5 additions and 12 deletions

View File

@@ -167,6 +167,7 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
static bool InitSettings()
{
gArgs.EnsureDataDir();
if (!gArgs.GetSettingsPath()) {
return true; // Do nothing if settings file disabled.
}