diff --git a/src/Base/FileInfo.cpp b/src/Base/FileInfo.cpp index 63506a2af..8464e24b2 100644 --- a/src/Base/FileInfo.cpp +++ b/src/Base/FileInfo.cpp @@ -176,8 +176,11 @@ std::string FileInfo::getTempFileName(const char* FileName, const char* Path) else std::strcat(buf, "/fileXXXXXX"); - /*int id =*/ (void) mkstemp(buf); - //FILE* file = fdopen(id, "w"); + int id = (void) mkstemp(buf); + if (id > -1) { + FILE* file = fdopen(id, "w"); + fclose(file); + } return std::string(buf); #endif }