diff options
author | MeshCollider <dobsonsa68@gmail.com> | 2017-10-12 22:04:46 +1300 |
---|---|---|
committer | MeshCollider <dobsonsa68@gmail.com> | 2017-11-18 00:50:59 +1300 |
commit | 8263f6a5ac3f3af102a2819b7e179b00db7e0437 (patch) | |
tree | 2d08c4f8eeed52a2c1101d0fe1c16556d6da2b73 /src/qt | |
parent | 9587a9c12b5d54263787a23c75f570db368318c1 (diff) |
Create walletdir if datadir doesn't exist and fix tests
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/bitcoin.cpp | 5 | ||||
-rw-r--r-- | src/qt/intro.cpp | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 05af10a529..557d7efcec 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -626,11 +626,6 @@ int main(int argc, char *argv[]) QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(gArgs.GetArg("-datadir", "")))); return EXIT_FAILURE; } - if (gArgs.IsArgSet("-walletdir") && !fs::is_directory(GetWalletDir())) { - QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), - QObject::tr("Error: Specified wallet directory \"%1\" does not exist.").arg(QString::fromStdString(gArgs.GetArg("-walletdir", "")))); - return EXIT_FAILURE; - } try { gArgs.ReadConfigFile(gArgs.GetArg("-conf", BITCOIN_CONF_FILENAME)); } catch (const std::exception& e) { diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index 9e4c765101..7f8a8394e6 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -214,7 +214,10 @@ bool Intro::pickDataDirectory() } dataDir = intro.getDataDirectory(); try { - TryCreateDirectories(GUIUtil::qstringToBoostPath(dataDir)); + if (TryCreateDirectories(GUIUtil::qstringToBoostPath(dataDir))) { + // If a new data directory has been created, make wallets subdirectory too + TryCreateDirectories(GUIUtil::qstringToBoostPath(dataDir) / "wallets"); + } break; } catch (const fs::filesystem_error&) { QMessageBox::critical(0, tr(PACKAGE_NAME), |