Skip to content

Commit 5844452

Browse files
committed
Remove unneeded GetTempPath, only use temp directory in unit tests
Based on btc#6702 btc#6701
1 parent 7fc893b commit 5844452

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

src/test/test_pivx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ BasicTestingSetup::~BasicTestingSetup()
5656
TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(chainName)
5757
{
5858
ClearDatadirCache();
59-
pathTemp = GetTempPath() / strprintf("test_pivx_%lu_%i", (unsigned long)GetTime(), (int)(InsecureRandRange(100000)));
59+
pathTemp = fs::temp_directory_path() / strprintf("test_pivx_%lu_%i", (unsigned long)GetTime(), (int)(InsecureRandRange(100000)));
6060
fs::create_directories(pathTemp);
6161
gArgs.ForceSetArg("-datadir", pathTemp.string());
6262

src/util.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -711,11 +711,6 @@ fs::path GetSpecialFolderPath(int nFolder, bool fCreate)
711711
}
712712
#endif
713713

714-
fs::path GetTempPath()
715-
{
716-
return fs::temp_directory_path();
717-
}
718-
719714
void runCommand(std::string strCommand)
720715
{
721716
if (strCommand.empty()) return;

src/util.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ void CreatePidFile(const fs::path& path, pid_t pid);
102102
#ifdef WIN32
103103
fs::path GetSpecialFolderPath(int nFolder, bool fCreate = true);
104104
#endif
105-
fs::path GetTempPath();
106105

107106
void runCommand(std::string strCommand);
108107

0 commit comments

Comments
 (0)