From 9dffaa1a9f8a067ac9e9ac2bad19851b604f8545 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 26 Aug 2012 22:56:12 -0500 Subject: [PATCH] Case insensitive exclusion pattern matching --- src/modify.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modify.c b/src/modify.c index d7f4f69b..a6d26884 100644 --- a/src/modify.c +++ b/src/modify.c @@ -680,7 +680,12 @@ static bool match_pattern(const char *path, const char *path_basename, /* A file name pattern */ string = path_basename; } - if (fnmatch(pat, string, FNM_PATHNAME) == 0) { + if (fnmatch(pat, string, FNM_PATHNAME + #ifdef FNM_CASEFOLD + | FNM_CASEFOLD + #endif + ) == 0) + { DEBUG("`%s' matches the pattern \"%s\"", string, pat); return true; -- 2.43.0