core: fix nullptr comparison in system-path.cc

This commit is contained in:
Gabriel Ferreira
2022-10-29 00:58:53 -03:00
parent 5595f4dc9a
commit 8a0eba7c03

View File

@@ -318,10 +318,10 @@ MakeTemporaryDirectoryName()
char* path = nullptr;
path = std::getenv("TMP");
if (!path || std::strlen(path) == 0)
if (!path || std::strlen(path) == 0)
{
path = std::getenv("TEMP");
if (path || std::strlen(path) == 0)
if (!path || std::strlen(path) == 0)
{
path = const_cast<char*>("/tmp");
}