Skip to content

Commit 300b1a8

Browse files
mingwandroidAlexpux
authored andcommitted
path.cc: Ignore zero-length exclusions
1 parent d5d06d5 commit 300b1a8

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
@@ -3441,7 +3441,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions,
34413441
{
34423442
/* Since we've got regex linked we should maybe switch to that, but
34433443
running regexes for every argument could be too slow. */
3444-
if ( strcmp (exclusions, "*") == 0 || strstr (arg, exclusions) == arg )
3444+
if ( strcmp (exclusions, "*") == 0 || (strlen (exclusions) && strstr (arg, exclusions) == arg) )
34453445
return (char*)arg;
34463446
exclusions += strlen (exclusions) + 1;
34473447
}

0 commit comments

Comments
 (0)