mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
Merge pull request #2044 from Diapolo/backupwallet
do not silently ignore errors on "backupwallet" RPC cmd
This commit is contained in:
commit
5c37be2db6
@ -1228,7 +1228,8 @@ Value backupwallet(const Array& params, bool fHelp)
|
||||
"Safely copies wallet.dat to destination, which can be a directory or a path with filename.");
|
||||
|
||||
string strDest = params[0].get_str();
|
||||
BackupWallet(*pwalletMain, strDest);
|
||||
if (!BackupWallet(*pwalletMain, strDest))
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "Error: Wallet backup failed!");
|
||||
|
||||
return Value::null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user