[td-4748]<fix>:fix the temp file generate buf on windows platform.

This commit is contained in:
Haojun Liao 2021-07-01 19:48:05 +08:00
parent 3a740a58bb
commit 6cd5224d69
1 changed files with 2 additions and 1 deletions

View File

@ -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 {