]> wimlib.net Git - wimlib/blobdiff - src/modify.c
Fix sequential extraction, and include progress info
[wimlib] / src / modify.c
index 0d096703d3b610bd7a538ae1058a1766a9fc47d0..3180c507a71116f88a23a1b7682673d6dbec281f 100644 (file)
  * the WIM image. */
 #define WIMLIB_ADD_IMAGE_FLAG_ROOT 0x80000000
 
-void destroy_image_metadata(struct image_metadata *imd, struct lookup_table *lt)
+void destroy_image_metadata(struct image_metadata *imd,
+                           struct lookup_table *table)
 {
-       free_dentry_tree(imd->root_dentry, lt);
+       free_dentry_tree(imd->root_dentry, table);
        free_security_data(imd->security_data);
 
        /* Get rid of the lookup table entry for this image's metadata resource
         * */
-       if (lt)
-               lookup_table_remove(lt, imd->metadata_lte);
+       if (table) {
+               lookup_table_unlink(table, imd->metadata_lte);
+               free_lookup_table_entry(imd->metadata_lte);
+       }
 }
 
 /*
@@ -700,6 +703,8 @@ WIMLIBAPI int wimlib_delete_image(WIMStruct *w, int image)
 
        /* Remove the image from the XML information. */
        xml_delete_image(&w->wim_info, image);
+
+       w->deletion_occurred = true;
        return 0;
 }