msvcrt: In _tempnam, if TMP is set, it has a precedence over the

parameter dir.
This commit is contained in:
Sasha Slijepcevic 2006-01-18 14:22:27 +01:00 committed by Alexandre Julliard
parent 917a801d80
commit 736cd60340
1 changed files with 3 additions and 0 deletions

View File

@ -1887,6 +1887,9 @@ __int64 _telli64(int fd)
char *_tempnam(const char *dir, const char *prefix)
{
char tmpbuf[MAX_PATH];
const char *tmp_dir = MSVCRT_getenv("TMP");
if (tmp_dir) dir = tmp_dir;
TRACE("dir (%s) prefix (%s)\n",dir,prefix);
if (GetTempFileNameA(dir,prefix,0,tmpbuf))