From 85f6c2b70df35847ddba3c3be6fec2dfb1889234 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 25 Mar 2014 09:26:11 +0100 Subject: [PATCH] qt: Only override -datadir if different from the default Fixes #3905. --- src/qt/intro.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index c77e8de30..d58a3085d 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -189,7 +189,12 @@ void Intro::pickDataDirectory() settings.setValue("strDataDir", dataDir); } - SoftSetArg("-datadir", GUIUtil::qstringToBoostPath(dataDir).string()); // use OS locale for path setting + /* Only override -datadir if different from the default, to make it possible to + * override -datadir in the bitcoin.conf file in the default data directory + * (to be consistent with bitcoind behavior) + */ + if(dataDir != getDefaultDataDirectory()) + SoftSetArg("-datadir", GUIUtil::qstringToBoostPath(dataDir).string()); // use OS locale for path setting } void Intro::setStatus(int status, const QString &message, quint64 bytesAvailable)