From a6f219b06bebf5878b970bebf53db7b942fe8731 Mon Sep 17 00:00:00 2001 From: deepsghimire <70006817+deepsghimire@users.noreply.github.com> Date: Mon, 20 Jan 2025 01:22:04 +0545 Subject: fix(log): unintuitive message for undefined $TMPDIR --- src/nvim/fileio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit