Files
MSYS2-packages/msys2-runtime/0023-path.cc-Ignore-zero-length-exclusions.patch
2017-09-13 16:00:29 +03:00

26 lines
975 B
Diff

From e70eb5fdbf98f6cbf92efef4c533c373df77ceaf Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Sun, 15 May 2016 09:31:51 +0100
Subject: [PATCH 23/23] path.cc: Ignore zero-length exclusions
---
winsup/cygwin/path.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 3ac2cd12c..71ecb51b1 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3511,7 +3511,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions,
{
/* Since we've got regex linked we should maybe switch to that, but
running regexes for every argument could be too slow. */
- if ( strcmp (exclusions, "*") == 0 || strstr (arg, exclusions) == arg )
+ if ( strcmp (exclusions, "*") == 0 || (strlen (exclusions) && strstr (arg, exclusions) == arg) )
return (char*)arg;
exclusions += strlen (exclusions) + 1;
}
--
2.14.1