Skip to content

Commit 9d5e8f9

Browse files
committed
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: bitcoin/bitcoin#10880 (comment) Tree-SHA512: 2d2c23c2deba26a1130a29279b3d8565b277eb90a98a6a6d7dd4948f5cbbd5ec5453b3082e3e4e21e0e2423e642bbd2f4433e4c21032d3c8cff27ee35e87e7e7
2 parents 60f9778 + 88af227 commit 9d5e8f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wallet/test/wallet_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
469469

470470
JSONRPCRequest request;
471471
request.params.setArray();
472-
request.params.push_back("wallet.backup");
472+
request.params.push_back((pathTemp / "wallet.backup").string());
473473
vpwallets.insert(vpwallets.begin(), &wallet);
474474
::dumpwallet(request);
475475
}
@@ -481,7 +481,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
481481

482482
JSONRPCRequest request;
483483
request.params.setArray();
484-
request.params.push_back("wallet.backup");
484+
request.params.push_back((pathTemp / "wallet.backup").string());
485485
vpwallets[0] = &wallet;
486486
::importwallet(request);
487487

0 commit comments

Comments
 (0)