Skip to content

Commit 41d650f

Browse files
committed
Merge pull request #6527
231c560 Use unique name for AlertNotify tempfile (Casey Rodarmor)
2 parents a4fe57d + 231c560 commit 41d650f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/alert_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ BOOST_AUTO_TEST_CASE(AlertNotify)
162162
SetMockTime(11);
163163
const std::vector<unsigned char>& alertKey = Params(CBaseChainParams::MAIN).AlertKey();
164164

165-
boost::filesystem::path temp = GetTempPath() / "alertnotify.txt";
166-
boost::filesystem::remove(temp);
165+
boost::filesystem::path temp = GetTempPath() /
166+
boost::filesystem::unique_path("alertnotify-%%%%.txt");
167167

168168
mapArgs["-alertnotify"] = std::string("echo %s >> ") + temp.string();
169169

0 commit comments

Comments
 (0)