diff options
Diffstat (limited to 'source/core/slang-io.cpp')
| -rw-r--r-- | source/core/slang-io.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/core/slang-io.cpp b/source/core/slang-io.cpp index c11ba85e0..17cd60160 100644 --- a/source/core/slang-io.cpp +++ b/source/core/slang-io.cpp @@ -101,7 +101,8 @@ namespace Slang char* chars = tempFileName.prepareForAppend(count); // https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettempfilenamea - // Generates a temporary file name. + // Generates a temporary file name. + // Will create a file with this name. DWORD ret = ::GetTempFileNameA(tempPath.getBuffer(), prefix.getBuffer(), 0, chars); if (ret == 0) @@ -111,6 +112,8 @@ namespace Slang tempFileName.appendInPlace(chars, ::strlen(chars)); } + SLANG_ASSERT(File::exists(tempFileName)); + outFileName = tempFileName; return SLANG_OK; } @@ -135,6 +138,8 @@ namespace Slang close(handle); outFileName = buffer.getBuffer(); + SLANG_ASSERT(File::exists(outFileName)); + return SLANG_OK; } #endif |
