Skip to content

Commit 231c560

Browse files
committed
Use unique name for AlertNotify tempfile
1 parent 149f96c commit 231c560

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)