From 2a9301b75a0ea106b0a347e9aa2d9e535a9e8029 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Tue, 27 Nov 2012 16:27:54 +0100 Subject: do not silently ignore errors on "backupwallet" RPC cmd --- src/rpc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3