We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96515a0 commit e6aa54cCopy full SHA for e6aa54c
src/tools/CommandLine.cpp
@@ -91,7 +91,11 @@ void Convert(std::string fileName) {
91
const std::string tempFileName = std::tmpnam(nullptr);
92
#else
93
// std::tmpnam is deprecated
94
- std::string tempFileName = std::getenv("TMPDIR");
+ std::string tempFileName;
95
+ const char* tmpDirEnv = std::getenv("TMPDIR");
96
+ if (tmpDirEnv != nullptr) {
97
+ tempFileName = tmpDirEnv;
98
+ }
99
#ifdef P_tmpdir
100
if (tempFileName.empty()) {
101
tempFileName = P_tmpdir;
0 commit comments