From f6d29a6ca8e91d9f3dabe5fde53a336fdb5473c1 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 5 Aug 2015 23:10:14 -0400 Subject: [PATCH] Use unique name for AlertNotify tempfile --- src/test/alert_tests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp index 38dcc6023..73481dd80 100644 --- a/src/test/alert_tests.cpp +++ b/src/test/alert_tests.cpp @@ -165,8 +165,8 @@ BOOST_AUTO_TEST_CASE(AlertNotify) SetMockTime(11); const std::vector& alertKey = Params(CBaseChainParams::MAIN).AlertKey(); - boost::filesystem::path temp = GetTempPath() / "alertnotify.txt"; - boost::filesystem::remove(temp); + boost::filesystem::path temp = GetTempPath() / + boost::filesystem::unique_path("alertnotify-%%%%.txt"); mapArgs["-alertnotify"] = std::string("echo %s >> ") + temp.string();