]> wimlib.net Git - wimlib/blobdiff - src/xml.c
Delay xml_update_image_info() until write
[wimlib] / src / xml.c
index a6dab415e891fdf996769bc0ec26f7e6e48207bb..8280e8edfc496f014029d3abcb25560c5c89f100 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -716,7 +716,6 @@ xml_update_image_info(WIMStruct *wim, int image)
                xmlFreeNode(totalbytes_node);
                xmlFreeNode(hardlinkbytes_node);
                xmlFreeNode(lastmodificationtime_node);
-               WARNING("Failed to update image information!");
                return WIMLIB_ERR_NOMEM;
        }
 
@@ -809,7 +808,10 @@ xml_export_image(const struct wim_xml_info *src_info, int src_image,
 
        xmlFreeProp(unlink_index_attribute(dest_node));
 
-       return append_image_node(dest_info, dest_node);
+       ret = append_image_node(dest_info, dest_node);
+       if (ret)
+               goto err;
+       return 0;
 
 err:
        xmlFreeNode(dest_node);