diff options
| author | Wladimir J. van der Laan <[email protected]> | 2012-11-27 23:41:50 -0800 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2012-11-27 23:41:50 -0800 |
| commit | 5c37be2db6177b8e6a4990b2efddcbac46b14a3f (patch) | |
| tree | c82eb37c5095a1c8b8fc7650126a80310b11070c /src/rpcwallet.cpp | |
| parent | Merge pull request #2006 from robbak/make-leveldb-macro (diff) | |
| parent | do not silently ignore errors on "backupwallet" RPC cmd (diff) | |
| download | discoin-5c37be2db6177b8e6a4990b2efddcbac46b14a3f.tar.xz discoin-5c37be2db6177b8e6a4990b2efddcbac46b14a3f.zip | |
Merge pull request #2044 from Diapolo/backupwallet
do not silently ignore errors on "backupwallet" RPC cmd
Diffstat (limited to 'src/rpcwallet.cpp')
| -rw-r--r-- | src/rpcwallet.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 5ebab755b..d597e5e3f 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -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; } |