]> wimlib.net Git - wimlib/blobdiff - src/metadata_resource.c
resource reading cleanups
[wimlib] / src / metadata_resource.c
index c187d6987dfc84d7f6da17a4259f6a6425144252..a3faa9c904e41d48a6c73a689a5d906b0e47a9de 100644 (file)
@@ -81,7 +81,7 @@ read_metadata_resource(struct wim_image_metadata *imd)
        DEBUG("Reading metadata resource (size=%"PRIu64").", metadata_blob->size);
 
        /* Read the metadata resource into memory.  (It may be compressed.)  */
-       ret = read_full_blob_into_alloc_buf(metadata_blob, &buf);
+       ret = read_blob_into_alloc_buf(metadata_blob, &buf);
        if (ret)
                return ret;
 
@@ -244,7 +244,9 @@ write_metadata_resource(WIMStruct *wim, int image, int write_resource_flags)
        /* Write the metadata resource to the output WIM using the proper
         * compression type, in the process updating the blob descriptor for the
         * metadata resource.  */
-       ret = write_wim_resource_from_buffer(buf, len, WIM_RESHDR_FLAG_METADATA,
+       ret = write_wim_resource_from_buffer(buf,
+                                            len,
+                                            true,
                                             &wim->out_fd,
                                             wim->out_compression_type,
                                             wim->out_chunk_size,