]> wimlib.net Git - wimlib/blobdiff - src/write.c
Code to handle some weird siutations and bad WIMs
[wimlib] / src / write.c
index 3866bed6934c80c78a902a7dffddbaa649b2170b..9aa8116c0b3dbb8b84b2c22e3c08eb3d85a04890 100644 (file)
@@ -247,7 +247,7 @@ static int write_file_resources(WIMStruct *w)
 {
 
        DEBUG("Writing file resources for image %u.", w->current_image);
-       return for_dentry_in_tree(wim_root_dentry(w), write_file_resource, w);
+       return for_dentry_in_tree(wim_root_dentry(w), write_dentry_resources, w);
 }
 
 /* Write the lookup table, xml data, and integrity table, then overwrite the WIM
@@ -416,6 +416,8 @@ WIMLIBAPI int wimlib_write(WIMStruct *w, const char *path, int image, int flags)
 
        for_lookup_table_entry(w->lookup_table, zero_out_refcnts, NULL);
 
+       w->write_flags = flags;
+
        ret = for_image(w, image, write_file_resources);
        if (ret != 0) {
                ERROR("Failed to write WIM file resources to `%s'", path);