]> wimlib.net Git - wimlib/commitdiff
Case insensitive exclusion pattern matching
authorEric Biggers <ebiggers3@gmail.com>
Mon, 27 Aug 2012 03:56:12 +0000 (22:56 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 27 Aug 2012 03:56:12 +0000 (22:56 -0500)
src/modify.c

index d7f4f69bbc9c308f672286621ce3b3b75294c9a1..a6d26884a08c9e63a16e1bada5c3612183ccccab 100644 (file)
@@ -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;