Skip to content

Commit cf06062

Browse files
committed
Correctly check for default wallet
1 parent 886e0d7 commit cf06062

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/wallet/walletutil.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,10 @@ WalletLocation::WalletLocation(const std::string& name)
100100

101101
bool WalletLocation::Exists() const
102102
{
103-
return fs::symlink_status(m_path).type() != fs::file_not_found;
103+
fs::path path = m_path;
104+
// For the default wallet, check specifically for the wallet.dat file
105+
if (m_name.empty()) {
106+
path = fs::absolute("wallet.dat", m_path);
107+
}
108+
return fs::symlink_status(path).type() != fs::file_not_found;
104109
}

0 commit comments

Comments
 (0)