X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fmetadata_resource.c;h=9cebf9ebc0c1be10daa386aa0fbd16c4565d6f9c;hb=f3e97b29c4a8c564d54b0fd11cd43a9b4cd6a8ad;hp=91b1121f92ef7efc7b346e68ae3e5d4cd7c656c6;hpb=fc8276d0a3efb3df5f7512b3fa9499eb1b3449eb;p=wimlib diff --git a/src/metadata_resource.c b/src/metadata_resource.c index 91b1121f..9cebf9eb 100644 --- a/src/metadata_resource.c +++ b/src/metadata_resource.c @@ -55,8 +55,10 @@ read_metadata_resource(WIMStruct *w, struct wim_image_metadata *imd) metadata_lte = imd->metadata_lte; metadata_len = wim_resource_size(metadata_lte); - DEBUG("Reading metadata resource: length = %"PRIu64", " - "offset = %"PRIu64"", metadata_len, + DEBUG("Reading metadata resource: original_size = %"PRIu64", " + "size = %"PRIu64", offset = %"PRIu64"", + metadata_lte->resource_entry.original_size, + metadata_lte->resource_entry.size, metadata_lte->resource_entry.offset); /* There is no way the metadata resource could possibly be less than (8 @@ -280,16 +282,11 @@ write_metadata_resource(WIMStruct *w) wimlib_get_compression_type(w), <e->output_resource_entry, lte->hash); - if (ret) - goto out_free_buf; - /* Note that although the SHA1 message digest of the metadata resource * is very likely to have changed, the corresponding lookup table entry * is not actually located in the hash table, so it need not be * re-inserted in the hash table. */ - lte->out_refcnt = 1; - lte->output_resource_entry.flags |= WIM_RESHDR_FLAG_METADATA; -out_free_buf: + /* All the data has been written to the new WIM; no need for the buffer * anymore */ FREE(buf);