mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Better handling of temporary folders
This commit is contained in:
parent
f87994edc7
commit
7e4462e0ac
6 changed files with 34 additions and 17 deletions
|
@ -324,13 +324,8 @@ std::string TestBase::getTestTempDirectory()
|
|||
if (!m_test_dir.empty())
|
||||
return m_test_dir;
|
||||
|
||||
char buf[32];
|
||||
porting::mt_snprintf(buf, sizeof(buf), "%08X", myrand());
|
||||
|
||||
m_test_dir = fs::TempPath() + DIR_DELIM "mttest_" + buf;
|
||||
if (!fs::CreateDir(m_test_dir))
|
||||
UASSERT(false);
|
||||
|
||||
m_test_dir = fs::CreateTempDir();
|
||||
UASSERT(!m_test_dir.empty());
|
||||
return m_test_dir;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue