diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index 8fc8435d7..dfc8e6381 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -1727,10 +1727,16 @@ std::string CFileContainer::getTemporaryDirectory() static std::string path; if (path.empty()) { - std::string tempDir = getenv("TEMP"); + const char *temp = getenv("TEMP"); + const char *tmp = getenv("TMP"); - if (tempDir.empty()) - tempDir = getenv("TMP"); + std::string tempDir; + + if (temp) + tempDir = temp; + + if (tempDir.empty() && tmp) + tempDir = tmp; #ifdef NL_OS_UNIX if (tempDir.empty())