aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-08-07 13:27:21 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-08-07 13:31:54 +0200
commitb81a8a5ea90c397c3b48384500d176e83c3af537 (patch)
treeabe8d212b5acda4eb746992f1f9ea0bb29d43110 /src
parent37ab117a87bac02a3341f4775e5448ea4793d2c8 (diff)
parenta1a998cf24c0cf1232e44ec8eaf2ad6875ab5153 (diff)
Merge #13667: wallet: Fix backupwallet for multiwallets
a1a998cf24c0cf1232e44ec8eaf2ad6875ab5153 wallet: Fix backupwallet for multiwallets (Daniel Kraft) Pull request description: `backupwallet` was broken for multiwallets in their own directories (i.e. something like `DATADIR/wallets/mywallet/wallet.dat`). In this case, the backup would use `DATADIR/wallets/wallet.dat` as source file and not take the specific wallet's directory into account. This led to either an error during the backup (if the wrong source file was not present) or would silently back up the wrong wallet; especially the latter behaviour can be quite bad for users. Tree-SHA512: 7efe2450ca047e40719fcc7cc211ed94699056020ac737cada7b59e8240298675960570c45079add424d0aab520437d5050d956acd695a9c2452dd4317b4d2c4
Diffstat (limited to 'src')
-rw-r--r--src/wallet/db.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index 01b8eacccb..00964b8cc8 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -768,7 +768,7 @@ bool BerkeleyDatabase::Backup(const std::string& strDest)
env->mapFileUseCount.erase(strFile);
// Copy wallet file
- fs::path pathSrc = GetWalletDir() / strFile;
+ fs::path pathSrc = env->Directory() / strFile;
fs::path pathDest(strDest);
if (fs::is_directory(pathDest))
pathDest /= strFile;