aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Rodarmor <casey@rodarmor.com>2015-08-05 23:10:14 -0400
committerLuke Dashjr <luke-jr+git@utopios.org>2015-09-22 00:43:12 +0000
commitf6d29a6ca8e91d9f3dabe5fde53a336fdb5473c1 (patch)
tree054d7fe967f7006381802f45b9884bdeaeb3173e
parente6adac7b3f971f04f883211d2c1f385c55d6718b (diff)
downloadbitcoin-f6d29a6ca8e91d9f3dabe5fde53a336fdb5473c1.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 38dcc6023c..73481dd802 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<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();