From: Eric Biggers Date: Tue, 26 Mar 2013 21:27:45 +0000 (-0500) Subject: Print each file or directory excluded X-Git-Tag: v1.3.2~6 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=237947e198385359a0c618b664d73bf4db36c405 Print each file or directory excluded --- diff --git a/doc/imagex-capture.1.in b/doc/imagex-capture.1.in index e36f0e13..76b10e73 100644 --- a/doc/imagex-capture.1.in +++ b/doc/imagex-capture.1.in @@ -202,6 +202,9 @@ forward slashes or backslashes, and the line separators may be either UNIX-style or DOS-style. However, globs with spaces in them currently must not be quoted. Empty lines are ignored. +On UNIX, drive letters are stripped from all patterns. On Windows, drive +letters are allowed, but must specify absolute paths and are treated as such. + If this option is not specified the following default configuration file is used: diff --git a/programs/imagex.c b/programs/imagex.c index 58c969eb..17cc36f6 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -1106,7 +1106,7 @@ imagex_capture_or_append(int argc, tchar **argv) { int c; int open_flags = 0; - int add_image_flags = 0; + int add_image_flags = WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE; int write_flags = 0; int compression_type = WIMLIB_COMPRESSION_TYPE_XPRESS; const tchar *wimfile; diff --git a/src/add_image.c b/src/add_image.c index d6175c23..0e55a981 100644 --- a/src/add_image.c +++ b/src/add_image.c @@ -286,7 +286,7 @@ unix_build_dentry_tree_recursive(struct wim_dentry **root_ret, ret = WIMLIB_ERR_INVALID_CAPTURE_CONFIG; goto out; } - if ((add_image_flags & WIMLIB_ADD_IMAGE_FLAG_VERBOSE) + if ((add_image_flags & WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE) && progress_func) { union wimlib_progress_info info; @@ -1042,6 +1042,9 @@ wimlib_add_image_multisource(WIMStruct *w, } #endif + if (add_image_flags & WIMLIB_ADD_IMAGE_FLAG_VERBOSE) + add_image_flags |= WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE; + if (!name || !*name) { ERROR("Must specify a non-empty string for the image name"); return WIMLIB_ERR_INVALID_PARAM; diff --git a/src/ntfs-capture.c b/src/ntfs-capture.c index 96650502..03c8720a 100644 --- a/src/ntfs-capture.c +++ b/src/ntfs-capture.c @@ -511,7 +511,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_p, if (exclude_path(path, path_len, config, false)) { /* Exclude a file or directory tree based on the capture * configuration file */ - if ((add_image_flags & WIMLIB_ADD_IMAGE_FLAG_VERBOSE) + if ((add_image_flags & WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE) && progress_func) { union wimlib_progress_info info; diff --git a/src/wimlib.h b/src/wimlib.h index 1ccdd3b3..dfa685f0 100644 --- a/src/wimlib.h +++ b/src/wimlib.h @@ -645,6 +645,12 @@ struct wimlib_capture_source { * */ #define WIMLIB_ADD_IMAGE_FLAG_STRICT_ACLS 0x00000040 +/** Call the progress function with the message + * ::WIMLIB_PROGRESS_MSG_SCAN_DENTRY when a directory or file is excluded from + * capture. This is a subset of the messages provided by + * ::WIMLIB_ADD_IMAGE_FLAG_VERBOSE. */ +#define WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE 0x00000080 + /****************************** * WIMLIB_EXPORT_FLAG_* * ******************************/ diff --git a/src/win32.c b/src/win32.c index 4e496548..57f6fdb9 100644 --- a/src/win32.c +++ b/src/win32.c @@ -751,7 +751,7 @@ win32_build_dentry_tree_recursive(struct wim_dentry **root_ret, ret = WIMLIB_ERR_INVALID_CAPTURE_CONFIG; goto out; } - if ((add_image_flags & WIMLIB_ADD_IMAGE_FLAG_VERBOSE) + if ((add_image_flags & WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE) && progress_func) { union wimlib_progress_info info;