Skip to content

Commit

Permalink
[Trivial] Add wallet filename to backup errors/warning
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed May 11, 2021
1 parent 3150797 commit c73a539
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4377,8 +4377,12 @@ bool CWallet::InitLoadWallet()
// automatic backups
std::string strWarning, strError;
if(!AutoBackupWallet(walletFile, strWarning, strError)) {
if (!strWarning.empty()) UIWarning(strWarning);
if (!strError.empty()) return UIError(strError);
if (!strWarning.empty()) {
UIWarning(strprintf("%s: %s", walletFile, strWarning));
}
if (!strError.empty()) {
return UIError(strprintf("%s: %s", walletFile, strError));
}
}

CWallet * const pwallet = CreateWalletFromFile(walletFile);
Expand Down

0 comments on commit c73a539

Please sign in to comment.