mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 06:52:36 +01:00
Correctly check for default wallet
This commit is contained in:
parent
886e0d75f5
commit
cf06062859
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue