X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fextract.c;h=c1a5adb62aa095417b3b74874385c96456dfa86e;hb=672dbeabbf152aefb1d8a7211d3c8a1feb3e1e51;hp=04d484f4e4216c4f3e2bc9ca1e4c7522e3f82555;hpb=62458ef728064652932d49fbab1116b2f2462fa8;p=wimlib diff --git a/src/extract.c b/src/extract.c index 04d484f4..c1a5adb6 100644 --- a/src/extract.c +++ b/src/extract.c @@ -1073,12 +1073,14 @@ static void inode_tally_features(const struct wim_inode *inode, struct wim_features *features) { - if (inode->i_attributes & FILE_ATTRIBUTE_ARCHIVE) - features->archive_files++; + if (inode->i_attributes & FILE_ATTRIBUTE_READONLY) + features->readonly_files++; if (inode->i_attributes & FILE_ATTRIBUTE_HIDDEN) features->hidden_files++; if (inode->i_attributes & FILE_ATTRIBUTE_SYSTEM) features->system_files++; + if (inode->i_attributes & FILE_ATTRIBUTE_ARCHIVE) + features->archive_files++; if (inode->i_attributes & FILE_ATTRIBUTE_COMPRESSED) features->compressed_files++; if (inode->i_attributes & FILE_ATTRIBUTE_ENCRYPTED) { @@ -1156,9 +1158,11 @@ do_feature_check(const struct wim_features *required_features, /* File attributes. */ if (!(extract_flags & WIMLIB_EXTRACT_FLAG_NO_ATTRIBUTES)) { - /* Note: Don't bother the user about FILE_ATTRIBUTE_ARCHIVE. - * We're an archive program, so theoretically we can do what we - * want with it. */ + + if (required_features->readonly_files && + !supported_features->readonly_files) + WARNING("Ignoring FILE_ATTRIBUTE_READONLY of %lu files", + required_features->readonly_files); if (required_features->hidden_files && !supported_features->hidden_files) @@ -1170,6 +1174,10 @@ do_feature_check(const struct wim_features *required_features, WARNING("Ignoring FILE_ATTRIBUTE_SYSTEM of %lu files", required_features->system_files); + /* Note: Don't bother the user about FILE_ATTRIBUTE_ARCHIVE. + * We're an archive program, so theoretically we can do what we + * want with it. */ + if (required_features->compressed_files && !supported_features->compressed_files) WARNING("Ignoring FILE_ATTRIBUTE_COMPRESSED of %lu files", @@ -1929,6 +1937,7 @@ wimlib_extract_image_from_pipe_with_progress(int pipe_fd, goto out_wimlib_free; wim_reshdr_to_desc_and_blob(&reshdr, pwm, metadata_rdesc, imd->metadata_blob); + pwm->refcnt++; if (i == image) { /* Metadata resource is for the image being extracted. @@ -1936,7 +1945,6 @@ wimlib_extract_image_from_pipe_with_progress(int pipe_fd, ret = read_metadata_resource(imd); if (ret) goto out_wimlib_free; - imd->modified = 1; } else { /* Metadata resource is not for the image being * extracted. Skip over it. */