diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-07-25 21:56:07 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-07-25 21:56:39 +0200 |
commit | 9d5e8f92a7dbac65e327a770998607b1b0f67db1 (patch) | |
tree | 47629f5fe0b56c9eaa9c6856f28fe3053be3aa50 /src/wallet | |
parent | 60f9778abfea615beac384a08e6a13ebec65275b (diff) | |
parent | 88af2276876868fc5b17a67ecaa86b219969d4c6 (diff) | |
download | bitcoin-9d5e8f92a7dbac65e327a770998607b1b0f67db1.tar.xz |
Merge #10927: test: Make sure wallet.backup is created in temp path
88af227 test: Make sure wallet.backup is created in temp path (Wladimir J. van der Laan)
Pull request description:
This assures that we don't overwrite a random file called `wallet.backup` that happens to be in the current directory. It also assures that the temporary file will be cleaned up.
Noticed by Evan Klitzke, came up in discussion here: https://github.com/bitcoin/bitcoin/pull/10880#discussion_r128460722
Tree-SHA512: 2d2c23c2deba26a1130a29279b3d8565b277eb90a98a6a6d7dd4948f5cbbd5ec5453b3082e3e4e21e0e2423e642bbd2f4433e4c21032d3c8cff27ee35e87e7e7
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/test/wallet_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index 8176a0017c..4a2cc9a139 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -469,7 +469,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup) JSONRPCRequest request; request.params.setArray(); - request.params.push_back("wallet.backup"); + request.params.push_back((pathTemp / "wallet.backup").string()); vpwallets.insert(vpwallets.begin(), &wallet); ::dumpwallet(request); } @@ -481,7 +481,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup) JSONRPCRequest request; request.params.setArray(); - request.params.push_back("wallet.backup"); + request.params.push_back((pathTemp / "wallet.backup").string()); vpwallets[0] = &wallet; ::importwallet(request); |