aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeepsghimire <70006817+deepsghimire@users.noreply.github.com>2025-01-20 01:22:04 +0545
committerGitHub <noreply@github.com>2025-01-19 11:37:04 -0800
commita6f219b06bebf5878b970bebf53db7b942fe8731 (patch)
treee692e1557e3e24603e1f9b2aabad63ef94786507
parent6696ea7f103814d3d5700107546280bf50a4004a (diff)
downloadrneovim-a6f219b06bebf5878b970bebf53db7b942fe8731.tar.gz
rneovim-a6f219b06bebf5878b970bebf53db7b942fe8731.tar.bz2
rneovim-a6f219b06bebf5878b970bebf53db7b942fe8731.zip
fix(log): unintuitive message for undefined $TMPDIR
-rw-r--r--src/nvim/fileio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 031ae30d41..1c9903695e 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -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;
}