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

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 18 10:50:46 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 736cd60340aa1c53011edbf24e137ec1f7624374
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=736cd60340aa1c53011edbf24e137ec1f7624374

Author: Sasha Slijepcevic <sascha93101 at yahoo.com>
Date:   Wed Jan 18 14:22:27 2006 +0100

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

---

 dlls/msvcrt/file.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 0b42816..1f751f8 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -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))




More information about the wine-cvs mailing list