- struct wim_dentry *root;
- struct wim_inode *inode;
- ATTR_TYPES stream_type;
-
- if (exclude_path(path, path_len, params->config, false)) {
- /* Exclude a file or directory tree based on the capture
- * configuration file */
- if ((params->add_flags & WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE)
- && params->progress_func)
- {
- union wimlib_progress_info info;
- info.scan.cur_path = path;
- info.scan.excluded = true;
- params->progress_func(WIMLIB_PROGRESS_MSG_SCAN_DENTRY, &info);
- }
- root = NULL;
- ret = 0;
+ struct wim_dentry *root = NULL;
+ struct wim_inode *inode = NULL;
+
+ ret = try_exclude(path, path_len, params);
+ if (ret < 0) /* Excluded? */
+ goto out_progress;
+ if (ret > 0) /* Error? */