Excludes: fnmatch doesn't treat '{' as special

Neither the documentation at
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13
nor the fnmatch source code in <glibc>/posix/fnmatch_loop.c points
toward { causing special matching behavior.
This commit is contained in:
Christian Kamm 2017-11-30 09:13:14 +01:00 committed by ckamm
parent e5c780ee19
commit 994f3bb644

View file

@ -661,7 +661,7 @@ void ExcludedFiles::prepare()
/* If an exclude entry contains some fnmatch-ish characters that
* we can't yet translate to regular expressions, we use the C-style
* fnmatch based codepath instead */
if (strchr(exclude, '[') || strchr(exclude, '{') || strchr(exclude, '\\')) {
if (strchr(exclude, '[') || strchr(exclude, '\\')) {
_nonRegexExcludes.append(exclude);
continue;
}