]> granicus.if.org Git - vim/commitdiff
patch 7.4.958 v7.4.958
authorBram Moolenaar <Bram@vim.org>
Thu, 3 Dec 2015 20:02:27 +0000 (21:02 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 3 Dec 2015 20:02:27 +0000 (21:02 +0100)
Problem:    Vim checks if the directory "$TMPDIR" exists.
Solution:   Do not check if the name starts with "$".

src/fileio.c
src/version.c

index ded95b728abc0a82c7162dd69734f9d0cae10855..b3fc2875041aec25cd6389ca35d31afe39865892 100644 (file)
@@ -7388,10 +7388,12 @@ vim_tempname(extra_char, keep)
            long        off;
 # endif
 
-           /* expand $TMP, leave room for "/v1100000/999999999" */
+           /* Expand $TMP, leave room for "/v1100000/999999999".
+            * Skip the directory check if the expansion fails. */
            expand_env((char_u *)tempdirs[i], itmp, TEMPNAMELEN - 20);
-           if (mch_isdir(itmp))                /* directory exists */
+           if (itmp[0] != '$' && mch_isdir(itmp))
            {
+               /* directory exists */
 # ifdef __EMX__
                /* If $TMP contains a forward slash (perhaps using bash or
                 * tcsh), don't add a backslash, use a forward slash!
index 3a3d34a99fa104167757043e3dfef386ceb9db46..0de1ef56be09b99737df553acb8fbaa3f7346821 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    958,
 /**/
     957,
 /**/