From 6cd5224d691d1a4288f83c191049fc350184c1d7 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 1 Jul 2021 19:48:05 +0800 Subject: [PATCH] [td-4748]:fix the temp file generate buf on windows platform. --- src/os/src/windows/wEnv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/src/windows/wEnv.c b/src/os/src/windows/wEnv.c index 19351eb7c9..21c6aa6642 100644 --- a/src/os/src/windows/wEnv.c +++ b/src/os/src/windows/wEnv.c @@ -48,9 +48,10 @@ void osInit() { strcpy(tsOsName, "Windows"); const char *tmpDir = getenv("tmp"); - if (tmpDir != NULL) { + if (tmpDir == NULL) { tmpDir = getenv("temp"); } + if (tmpDir != NULL) { strcpy(tsTempDir, tmpDir); } else { -- GitLab