From cf060628590fab87d73f278e744d70ef2d5d81db Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Thu, 2 Apr 2020 21:13:02 -0400 Subject: [PATCH] Correctly check for default wallet --- src/wallet/walletutil.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wallet/walletutil.cpp b/src/wallet/walletutil.cpp index 04c2407a8..8bac0608a 100644 --- a/src/wallet/walletutil.cpp +++ b/src/wallet/walletutil.cpp @@ -100,5 +100,10 @@ WalletLocation::WalletLocation(const std::string& name) bool WalletLocation::Exists() const { - return fs::symlink_status(m_path).type() != fs::file_not_found; + fs::path path = m_path; + // For the default wallet, check specifically for the wallet.dat file + if (m_name.empty()) { + path = fs::absolute("wallet.dat", m_path); + } + return fs::symlink_status(path).type() != fs::file_not_found; }