aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2012-11-27 16:27:54 +0100
committerLuke Dashjr <luke-jr+git@utopios.org>2012-11-29 03:35:25 +0000
commit2a9301b75a0ea106b0a347e9aa2d9e535a9e8029 (patch)
tree5eeda2cd7a78cdd8e533ce6560f9873fc30f2957
parent6247c53528eae6fd534f22cb5b603dd7546e9502 (diff)
downloadbitcoin-2a9301b75a0ea106b0a347e9aa2d9e535a9e8029.tar.xz
do not silently ignore errors on "backupwallet" RPC cmd
-rw-r--r--src/rpc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc.cpp b/src/rpc.cpp
index 824297beaf..c465ee32df 100644
--- a/src/rpc.cpp
+++ b/src/rpc.cpp
@@ -1255,7 +1255,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;
}