aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Rodarmor <casey@rodarmor.com>2015-08-05 23:10:14 -0400
committerCasey Rodarmor <casey@rodarmor.com>2015-08-05 23:12:26 -0400
commit231c5601a1cd7689fa59e9b67b088b2d5f8d0e1c (patch)
treed19ee0783bd35a64d0f67332c418ac54d90a2e3d
parent149f96c9b0693a61f27016572a12fb21436a442d (diff)
downloadbitcoin-231c5601a1cd7689fa59e9b67b088b2d5f8d0e1c.tar.xz
Use unique name for AlertNotify tempfile
-rw-r--r--src/test/alert_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp
index b8d5606cc3..dd3c51d09b 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<unsigned char>& 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();