diff options
author | Chun Kuan Lee <ken2812221@gmail.com> | 2018-10-23 13:26:27 +0800 |
---|---|---|
committer | Chun Kuan Lee <ken2812221@gmail.com> | 2018-11-06 08:28:02 +0800 |
commit | 15c93f075a881deb3ad7b1dd8a4516a9b06e5e11 (patch) | |
tree | 9bbeeba05f637480c344d82b009488869e005e3f /src/wallet/wallet.cpp | |
parent | c456fbd8dfcc748e5ec9feaa57ec0f2900f99cde (diff) | |
download | bitcoin-15c93f075a881deb3ad7b1dd8a4516a9b06e5e11.tar.xz |
wallet: Add trailing wallet.dat when detecting duplicate wallet if it's a directory.
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 2ea9f45462..0061ac2294 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3848,11 +3848,9 @@ bool CWallet::Verify(const WalletLocation& location, bool salvage_wallet, std::s } // Make sure that the wallet path doesn't clash with an existing wallet path - for (auto wallet : GetWallets()) { - if (wallet->GetLocation().GetPath() == wallet_path) { - error_string = strprintf("Error loading wallet %s. Duplicate -wallet filename specified.", location.GetName()); - return false; - } + if (IsWalletLoaded(wallet_path)) { + error_string = strprintf("Error loading wallet %s. Duplicate -wallet filename specified.", location.GetName()); + return false; } try { |