Skip to content

Commit 11f1b63

Browse files
mingwandroidGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
path.cc: Ignore zero-length exclusions
1 parent 5d5403c commit 11f1b63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

winsup/cygwin/path.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3625,7 +3625,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions,
36253625
{
36263626
/* Since we've got regex linked we should maybe switch to that, but
36273627
running regexes for every argument could be too slow. */
3628-
if ( strcmp (exclusions, "*") == 0 || strstr (arg, exclusions) == arg )
3628+
if ( strcmp (exclusions, "*") == 0 || (strlen (exclusions) && strstr (arg, exclusions) == arg) )
36293629
return (char*)arg;
36303630
exclusions += strlen (exclusions) + 1;
36313631
}

0 commit comments

Comments
 (0)