Skip to content

Commit d82103e

Browse files
committed
patch 7.4.1117
Problem: No longer get "." and ".." in directory list. Solution: Do not skip "." and ".." unless EW_DODOT is set.
1 parent b0967d5 commit d82103e

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

src/misc1.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10013,7 +10013,7 @@ dos_expandpath(
1001310013
if (p[0] == '*' && p[1] == '*')
1001410014
starstar = TRUE;
1001510015

10016-
starts_with_dot = *s == '.' || (flags & EW_DODOT);
10016+
starts_with_dot = *s == '.';
1001710017
pat = file_pat_to_reg_pat(s, e, NULL, FALSE);
1001810018
if (pat == NULL)
1001910019
{
@@ -10096,8 +10096,9 @@ dos_expandpath(
1009610096
#endif
1009710097
/* Ignore entries starting with a dot, unless when asked for. Accept
1009810098
* all entries found with "matchname". */
10099-
if ((p[0] != '.' || (starts_with_dot
10100-
&& p[1] != NUL && (p[1] != '.' || p[2] != NUL)))
10099+
if ((p[0] != '.' || starts_with_dot
10100+
|| ((flags & EW_DODOT)
10101+
&& p[1] != NUL && (p[1] != '.' || p[2] != NUL)))
1010110102
&& (matchname == NULL
1010210103
|| (regmatch.regprog != NULL
1010310104
&& vim_regexec(&regmatch, p, (colnr_T)0))
@@ -10326,7 +10327,7 @@ unix_expandpath(gap, path, wildoff, flags, didstar)
1032610327
starstar = TRUE;
1032710328

1032810329
/* convert the file pattern to a regexp pattern */
10329-
starts_with_dot = *s == '.' || (flags & EW_DODOT);
10330+
starts_with_dot = *s == '.';
1033010331
pat = file_pat_to_reg_pat(s, e, NULL, FALSE);
1033110332
if (pat == NULL)
1033210333
{
@@ -10375,9 +10376,10 @@ unix_expandpath(gap, path, wildoff, flags, didstar)
1037510376
dp = readdir(dirp);
1037610377
if (dp == NULL)
1037710378
break;
10378-
if ((dp->d_name[0] != '.' || (starts_with_dot
10379-
&& dp->d_name[1] != NUL
10380-
&& (dp->d_name[1] != '.' || dp->d_name[2] != NUL)))
10379+
if ((dp->d_name[0] != '.' || starts_with_dot
10380+
|| ((flags & EW_DODOT)
10381+
&& dp->d_name[1] != NUL
10382+
&& (dp->d_name[1] != '.' || dp->d_name[2] != NUL)))
1038110383
&& ((regmatch.regprog != NULL && vim_regexec(&regmatch,
1038210384
(char_u *)dp->d_name, (colnr_T)0))
1038310385
|| ((flags & EW_NOTWILD)

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+
1117,
744746
/**/
745747
1116,
746748
/**/

0 commit comments

Comments
 (0)