From 231c5601a1cd7689fa59e9b67b088b2d5f8d0e1c 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 b8d5606cc..dd3c51d09 100644 --- a/src/test/alert_tests.cpp +++ b/src/test/alert_tests.cpp @@ -162,8 +162,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();