X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fextract_image.c;h=b6eeaf194809c4b3c7802f286026df9eb79bfa09;hp=e1096647ae5cd7e7346361c0d29abdc6e7deae7e;hb=c3fc666144a2c0ee61953391548aa852b9eaad8e;hpb=575d1f6727bf92c0fac6daae97b35add88eba7d7 diff --git a/src/extract_image.c b/src/extract_image.c index e1096647..b6eeaf19 100644 --- a/src/extract_image.c +++ b/src/extract_image.c @@ -555,8 +555,9 @@ apply_dentry_timestamps_normal(struct wim_dentry *dentry, void *arg) #endif } -/* Extract a dentry if it hasn't already been extracted, and either the dentry - * has no streams or WIMLIB_EXTRACT_FLAG_NO_STREAMS is not specified. */ +/* Extract a dentry if it hasn't already been extracted and either + * WIMLIB_EXTRACT_FLAG_NO_STREAMS is not specified, or the dentry is a directory + * and/or has no unnamed stream. */ static int maybe_apply_dentry(struct wim_dentry *dentry, void *arg) { @@ -566,11 +567,10 @@ maybe_apply_dentry(struct wim_dentry *dentry, void *arg) if (dentry->is_extracted) return 0; - if (args->extract_flags & WIMLIB_EXTRACT_FLAG_NO_STREAMS) - if (inode_unnamed_lte_resolved(dentry->d_inode) && - !(dentry->d_inode->i_attributes & (FILE_ATTRIBUTE_DIRECTORY | - FILE_ATTRIBUTE_ENCRYPTED))) - return 0; + if (args->extract_flags & WIMLIB_EXTRACT_FLAG_NO_STREAMS && + !dentry_is_directory(dentry) && + inode_unnamed_lte_resolved(dentry->d_inode) != NULL) + return 0; if ((args->extract_flags & WIMLIB_EXTRACT_FLAG_VERBOSE) && args->progress_func) {