X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fcapture_common.c;h=967d58eb53efc7987dbf84278a2f6c3b9b24929f;hb=01be73ad93236a0f6cf7e000b4f8ac91fea6dff3;hp=8f382251e3f5d45d478a71b7deb21ee6e627ef96;hpb=01c6f902b2a48a33af3f94e29791f85c68df91d0;p=wimlib diff --git a/src/capture_common.c b/src/capture_common.c index 8f382251..967d58eb 100644 --- a/src/capture_common.c +++ b/src/capture_common.c @@ -182,6 +182,25 @@ match_pattern(const tchar *path, return false; } +void +do_capture_progress(struct add_image_params *params, int status) +{ + switch (status) { + case WIMLIB_SCAN_DENTRY_OK: + if (!(params->add_flags & WIMLIB_ADD_FLAG_VERBOSE)) + return; + case WIMLIB_SCAN_DENTRY_UNSUPPORTED: + case WIMLIB_SCAN_DENTRY_EXCLUDED: + if (!(params->add_flags & WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE)) + return; + } + params->progress.scan.status = status; + if (params->progress_func) { + params->progress_func(WIMLIB_PROGRESS_MSG_SCAN_DENTRY, + ¶ms->progress); + } +} + /* Return true if the image capture configuration file indicates we should * exclude the filename @path from capture. *