Cleanups for walletdir PR

This commit is contained in:
MeshCollider
2017-11-18 13:36:37 +13:00
parent 0d89fa0877
commit b67342906c
5 changed files with 13 additions and 5 deletions

View File

@@ -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());

View File

@@ -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()
{

View File

@@ -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();