aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorMeshCollider <dobsonsa68@gmail.com>2017-11-18 13:36:37 +1300
committerMeshCollider <dobsonsa68@gmail.com>2017-12-13 23:36:43 +1300
commitb67342906ced2353d378f4369c8d8a979d525fee (patch)
treee9872fb5c48a83b3407daed81661488e583e3137 /src/wallet
parent0d89fa0877930c6c8a539a656c1009ad8ab6755b (diff)
Cleanups for walletdir PR
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/init.cpp5
-rw-r--r--src/wallet/walletutil.cpp2
-rw-r--r--src/wallet/walletutil.h3
3 files changed, 7 insertions, 3 deletions
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp
index 67c46df87d..788bac2a46 100644
--- a/src/wallet/init.cpp
+++ b/src/wallet/init.cpp
@@ -194,7 +194,10 @@ bool VerifyWallets()
}
if (gArgs.IsArgSet("-walletdir") && !fs::is_directory(GetWalletDir())) {
- return InitError(strprintf(_("Error: Specified wallet directory \"%s\" does not exist."), gArgs.GetArg("-walletdir", "").c_str()));
+ if (fs::exists(fs::system_complete(gArgs.GetArg("-walletdir", "")))) {
+ return InitError(strprintf(_("Specified -walletdir \"%s\" is not a directory"), gArgs.GetArg("-walletdir", "").c_str()));
+ }
+ return InitError(strprintf(_("Specified -walletdir \"%s\" does not exist"), gArgs.GetArg("-walletdir", "").c_str()));
}
LogPrintf("Using wallet directory %s\n", GetWalletDir().string());
diff --git a/src/wallet/walletutil.cpp b/src/wallet/walletutil.cpp
index fbb5215a51..f15e5de1e2 100644
--- a/src/wallet/walletutil.cpp
+++ b/src/wallet/walletutil.cpp
@@ -2,7 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include "wallet/walletutil.h"
+#include <wallet/walletutil.h>
fs::path GetWalletDir()
{
diff --git a/src/wallet/walletutil.h b/src/wallet/walletutil.h
index a94f286a44..50ff736402 100644
--- a/src/wallet/walletutil.h
+++ b/src/wallet/walletutil.h
@@ -5,7 +5,8 @@
#ifndef BITCOIN_WALLET_UTIL_H
#define BITCOIN_WALLET_UTIL_H
-#include "util.h"
+#include <chainparamsbase.h>
+#include <util.h>
//! Get the path of the wallet directory.
fs::path GetWalletDir();