- if (!S_ISREG(stbuf.st_mode) && !S_ISDIR(stbuf.st_mode)
- && !S_ISLNK(stbuf.st_mode)) {
- ERROR("`%s' is not a regular file, directory, or symbolic link.",
- path);
- ret = WIMLIB_ERR_SPECIAL_FILE;
+
+ if (!S_ISREG(stbuf.st_mode) &&
+ !S_ISDIR(stbuf.st_mode) &&
+ !S_ISLNK(stbuf.st_mode))
+ {
+ if (params->add_flags & WIMLIB_ADD_FLAG_NO_UNSUPPORTED_EXCLUDE)
+ {
+ ERROR("Can't archive unsupported file \"%s\"", path);
+ ret = WIMLIB_ERR_UNSUPPORTED_FILE;
+ goto out;
+ }
+ params->progress.scan.cur_path = path;
+ do_capture_progress(params, WIMLIB_SCAN_DENTRY_UNSUPPORTED, NULL);
+ ret = 0;