Skip to content

Commit 8fdf594

Browse files
laanwjPastaPastaPasta
authored andcommitted
Merge bitcoin#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#10880 (comment) Tree-SHA512: 2d2c23c2deba26a1130a29279b3d8565b277eb90a98a6a6d7dd4948f5cbbd5ec5453b3082e3e4e21e0e2423e642bbd2f4433e4c21032d3c8cff27ee35e87e7e7
1 parent b2b0bc9 commit 8fdf594

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
@@ -472,7 +472,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
472472

473473
JSONRPCRequest request;
474474
request.params.setArray();
475-
request.params.push_back("wallet.backup");
475+
request.params.push_back((pathTemp / "wallet.backup").string());
476476
vpwallets.insert(vpwallets.begin(), &wallet);
477477
::dumpwallet(request);
478478
}
@@ -484,7 +484,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
484484

485485
JSONRPCRequest request;
486486
request.params.setArray();
487-
request.params.push_back("wallet.backup");
487+
request.params.push_back((pathTemp / "wallet.backup").string());
488488
vpwallets[0] = &wallet;
489489
::importwallet(request);
490490

0 commit comments

Comments
 (0)