Merge pull request #6712 from taosdata/fix/query

[td-4748]<fix>:fix the temp file generate bug on windows.
This commit is contained in:
Haojun Liao 2021-07-02 12:05:22 +08:00 committed by GitHub
commit 51b975f964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -48,9 +48,10 @@ void osInit() {
strcpy(tsOsName, "Windows"); strcpy(tsOsName, "Windows");
const char *tmpDir = getenv("tmp"); const char *tmpDir = getenv("tmp");
if (tmpDir != NULL) { if (tmpDir == NULL) {
tmpDir = getenv("temp"); tmpDir = getenv("temp");
} }
if (tmpDir != NULL) { if (tmpDir != NULL) {
strcpy(tsTempDir, tmpDir); strcpy(tsTempDir, tmpDir);
} else { } else {