X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fcapture_common.c;h=967d58eb53efc7987dbf84278a2f6c3b9b24929f;hp=8f382251e3f5d45d478a71b7deb21ee6e627ef96;hb=0ab938cc9554f3d5c6835c14b9177823e0e9b7bb;hpb=dfb714d9e4291b8fe7a8d4d955d42f8169ada770 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. *