X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fwin32_apply.c;h=3c09f9a8464bc67671540df750c303d37f7774b5;hp=b357dd8505159dd7650a76ba885a62f32acf4123;hb=898222314c16df0f6001cfe4fbbe67b678b86455;hpb=06b7241e194674d56c970fc56441beb84bc258bb diff --git a/src/win32_apply.c b/src/win32_apply.c index b357dd85..3c09f9a8 100644 --- a/src/win32_apply.c +++ b/src/win32_apply.c @@ -30,14 +30,13 @@ #include "wimlib/win32_common.h" #include "wimlib/apply.h" -#include "wimlib/capture.h" /* for mangle_pat() */ +#include "wimlib/capture.h" /* for mangle_pat() and match_pattern_list() */ #include "wimlib/dentry.h" #include "wimlib/error.h" #include "wimlib/lookup_table.h" #include "wimlib/resource.h" #include "wimlib/textfile.h" #include "wimlib/xml.h" -#include "wimlib/wildcard.h" #include "wimlib/wim.h" #include "wimlib/wimboot.h" @@ -130,7 +129,6 @@ in_prepopulate_list(struct wim_dentry *dentry, struct apply_ctx *ctx) { struct string_set *pats; const tchar *path; - size_t path_nchars; pats = get_private_data(ctx)->prepopulate_pats; if (!pats || !pats->num_strings) @@ -140,14 +138,7 @@ in_prepopulate_list(struct wim_dentry *dentry, struct apply_ctx *ctx) if (!path) return false; - path_nchars = tstrlen(path); - - for (size_t i = 0; i < pats->num_strings; i++) - if (match_path(path, path_nchars, pats->strings[i], - OS_PREFERRED_PATH_SEPARATOR, true)) - return true; - - return false; + return match_pattern_list(path, tstrlen(path), pats); } static int