-/*
- * Determine whether the filesystem @path should be excluded from capture, based
- * on the current capture configuration file.
- *
- * The @path must be given relative to the root of the capture, but with a
- * leading path separator. For example, if the file "in/file" is being tested
- * and the library user ran wimlib_add_image(wim, "in", ...), then the directory
- * "in" is the root of the capture and the path should be specified as "/file".
- *
- * Also, all path separators in @path must be OS_PREFERRED_PATH_SEPARATOR, there
- * cannot be trailing slashes, and there cannot be consecutive path separators.
- *
- * As a special case, the empty string will be interpreted as a single path
- * separator (which means the root of capture itself).
- */
-static bool
-should_exclude_path(const tchar *path, size_t path_nchars,
- const struct capture_config *config)
-{
- tchar dummy[2];
-
- if (!config)
- return false;
-
- if (!*path) {
- dummy[0] = OS_PREFERRED_PATH_SEPARATOR;
- dummy[1] = T('\0');
- path = dummy;
- path_nchars = 1;
- }
-
- return match_pattern_list(path, path_nchars, &config->exclusion_pats) &&
- !match_pattern_list(path, path_nchars, &config->exclusion_exception_pats);
-
-}
-