diff options
author | Andrew Chow <achow101@gmail.com> | 2016-08-08 14:17:23 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-09-13 11:39:08 +0200 |
commit | a37cec537b70254a5587dd2aee6cfaad46349bcf (patch) | |
tree | 02e7e64d9eef3cffd68656d8ea5c34fedcce23b9 /src/qt/intro.cpp | |
parent | d9f0d4e0737a1f29173ee5407ba701496ba9f46b (diff) | |
download | bitcoin-a37cec537b70254a5587dd2aee6cfaad46349bcf.tar.xz |
Persist the datadir after option reset
Github-Pull: #8487
Rebased-From: 15df3c196b2359505980a2b0217133e0bb550565 57acb82e7014f3214229349485fa3f57842b10ae
Diffstat (limited to 'src/qt/intro.cpp')
-rw-r--r-- | src/qt/intro.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index 6a5740e21d..1a241ae0f0 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -178,7 +178,7 @@ bool Intro::pickDataDirectory() /* 2) Allow QSettings to override default dir */ dataDir = settings.value("strDataDir", dataDir).toString(); - if(!fs::exists(GUIUtil::qstringToBoostPath(dataDir)) || GetBoolArg("-choosedatadir", DEFAULT_CHOOSE_DATADIR)) + if(!fs::exists(GUIUtil::qstringToBoostPath(dataDir)) || GetBoolArg("-choosedatadir", DEFAULT_CHOOSE_DATADIR) || settings.value("fReset", false).toBool() || GetBoolArg("-resetguisettings", false)) { /* If current default data directory does not exist, let the user choose one */ Intro intro; @@ -204,6 +204,7 @@ bool Intro::pickDataDirectory() } settings.setValue("strDataDir", dataDir); + settings.setValue("fReset", false); } /* 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 |