Skip to content
Snippets Groups Projects
Commit 2470af62 authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

_tempnam and _wtempnam should not create the temp file (reported by

Wim Vanderbauwhede).
parent 757caa01
No related branches found
No related tags found
No related merge requests found
......@@ -1412,6 +1412,7 @@ char *_tempnam(const char *dir, const char *prefix)
if (GetTempFileNameA(dir,prefix,0,tmpbuf))
{
TRACE("got name (%s)\n",tmpbuf);
DeleteFileA(tmpbuf);
return _strdup(tmpbuf);
}
TRACE("failed (%ld)\n",GetLastError());
......@@ -1429,6 +1430,7 @@ MSVCRT_wchar_t *_wtempnam(const MSVCRT_wchar_t *dir, const MSVCRT_wchar_t *prefi
if (GetTempFileNameW(dir,prefix,0,tmpbuf))
{
TRACE("got name (%s)\n",debugstr_w(tmpbuf));
DeleteFileW(tmpbuf);
return _wcsdup(tmpbuf);
}
TRACE("failed (%ld)\n",GetLastError());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment