fix(log): unintuitive message for undefined $TMPDIR

This commit is contained in:
deepsghimire 2025-01-20 01:22:04 +05:45 committed by GitHub
parent 6696ea7f10
commit a6f219b06b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3276,7 +3276,11 @@ static void vim_mktempdir(void)
expand_env((char *)temp_dirs[i], tmp, TEMP_FILE_PATH_MAXLEN - 64);
if (!os_isdir(tmp)) {
if (strequal("$TMPDIR", temp_dirs[i])) {
WLOG("$TMPDIR tempdir not a directory (or does not exist): %s", tmp);
if (!os_getenv("TMPDIR")) {
WLOG("$TMPDIR is unset");
} else {
WLOG("$TMPDIR tempdir not a directory (or does not exist): \"%s\"", tmp);
}
}
continue;
}