diff options
| author | Philip Kaufmann <[email protected]> | 2012-11-27 16:27:54 +0100 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2012-11-29 03:35:25 +0000 |
| commit | 2a9301b75a0ea106b0a347e9aa2d9e535a9e8029 (patch) | |
| tree | 5eeda2cd7a78cdd8e533ce6560f9873fc30f2957 /src | |
| parent | ConnectBlock(): fix error() format to be unsigned (diff) | |
| download | discoin-2a9301b75a0ea106b0a347e9aa2d9e535a9e8029.tar.xz discoin-2a9301b75a0ea106b0a347e9aa2d9e535a9e8029.zip | |
do not silently ignore errors on "backupwallet" RPC cmd
Diffstat (limited to 'src')
| -rw-r--r-- | src/rpc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc.cpp b/src/rpc.cpp index 824297bea..c465ee32d 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; } |