diff options
Diffstat (limited to 'src/nvim/tempfile.c')
-rw-r--r-- | src/nvim/tempfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/tempfile.c b/src/nvim/tempfile.c index a218c03fdb..afe926b2ef 100644 --- a/src/nvim/tempfile.c +++ b/src/nvim/tempfile.c @@ -32,8 +32,9 @@ static void vim_maketempdir(void) char_u path[TEMP_FILE_PATH_MAXLEN]; for (size_t i = 0; i < ARRAY_SIZE(temp_dirs); ++i) { // Expand environment variables, leave room for "/nvimXXXXXX/999999999" + // Skip the directory check if the expansion fails. expand_env((char_u *)temp_dirs[i], template, TEMP_FILE_PATH_MAXLEN - 22); - if (!os_isdir(template)) { // directory doesn't exist + if (template[0] == '$' || !os_isdir(template)) { continue; } |