Skip to content

Commit e1a6199

Browse files
committed
patch 7.4.958
Problem: Vim checks if the directory "$TMPDIR" exists. Solution: Do not check if the name starts with "$".
1 parent bc96c29 commit e1a6199

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/fileio.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7388,10 +7388,12 @@ vim_tempname(extra_char, keep)
73887388
long off;
73897389
# endif
73907390

7391-
/* expand $TMP, leave room for "/v1100000/999999999" */
7391+
/* Expand $TMP, leave room for "/v1100000/999999999".
7392+
* Skip the directory check if the expansion fails. */
73927393
expand_env((char_u *)tempdirs[i], itmp, TEMPNAMELEN - 20);
7393-
if (mch_isdir(itmp)) /* directory exists */
7394+
if (itmp[0] != '$' && mch_isdir(itmp))
73947395
{
7396+
/* directory exists */
73957397
# ifdef __EMX__
73967398
/* If $TMP contains a forward slash (perhaps using bash or
73977399
* tcsh), don't add a backslash, use a forward slash!

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
958,
744746
/**/
745747
957,
746748
/**/

0 commit comments

Comments
 (0)