From 5ede6282b6f28fcd71d6eb556dae69e83d925e11 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 29 Apr 2014 17:04:57 -0500 Subject: [PATCH] A couple cleanups from last commits --- include/wimlib.h | 4 ++-- include/wimlib/capture.h | 2 +- src/capture_common.c | 1 + src/wildcard.c | 9 +++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/wimlib.h b/include/wimlib.h index 6a5ba2f8..b95fc719 100644 --- a/include/wimlib.h +++ b/include/wimlib.h @@ -973,7 +973,7 @@ struct wimlib_capture_source { * filesystem to be included in the WIM image. */ wimlib_tchar *fs_source_path; - /** Destination path in the WIM image. Use WIMLIB_WIM_ROOT_PATH to + /** Destination path in the WIM image. Use ::WIMLIB_WIM_ROOT_PATH to * specify the root directory of the WIM image. */ wimlib_tchar *wim_target_path; @@ -1828,7 +1828,7 @@ struct wimlib_add_command { /** Filesystem path to the file or directory tree to add. */ wimlib_tchar *fs_source_path; - /** Destination path in the WIM image. Use WIMLIB_WIM_ROOT_PATH to + /** Destination path in the WIM image. Use ::WIMLIB_WIM_ROOT_PATH to * specify the root directory of the WIM image. */ wimlib_tchar *wim_target_path; diff --git a/include/wimlib/capture.h b/include/wimlib/capture.h index 8d79542f..d0c7a324 100644 --- a/include/wimlib/capture.h +++ b/include/wimlib/capture.h @@ -80,7 +80,7 @@ match_pattern_list(const tchar *path, size_t path_nchars, const struct string_set *list); extern bool -exclude_path(const tchar *path, size_t path_len, +exclude_path(const tchar *path, size_t path_nchars, const struct capture_config *config); typedef int (*capture_tree_t)(struct wim_dentry **, const tchar *, diff --git a/src/capture_common.c b/src/capture_common.c index 99d6af66..7db7c5cf 100644 --- a/src/capture_common.c +++ b/src/capture_common.c @@ -199,6 +199,7 @@ exclude_path(const tchar *path, size_t path_nchars, 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) && diff --git a/src/wildcard.c b/src/wildcard.c index 742b5647..2619f47b 100644 --- a/src/wildcard.c +++ b/src/wildcard.c @@ -106,16 +106,17 @@ match_wildcard(const tchar *string, const tchar *wildcard, * path separators in the pattern must be @path_sep, and there cannot be * consecutive path separators, and there cannot be a trailing path * separator. If there is a leading path separator, the match is attempted - * with the filename only; otherwise, the matchis attempted with the whole + * with the filename only; otherwise, the match is attempted with the whole * path. * * @path_sep - * Path separator character in @path and @wildcard. + * Path separator character used in @path and @wildcard. * * @prefix_ok * If %true, allow a prefix of @path, terminated by a path separator, to - * match, in addition to @path itself. a.k.a. also return true if the - * wildcard actually matches one of the ancestor directories of @path. + * match the pattern, in addition to @path itself. In other words, return + * %true if the pattern actually matches one of the ancestor directories of + * @path. * * Returns %true if there was a match; %false if there was not. */ -- 2.43.0