]> wimlib.net Git - wimlib/blobdiff - src/wim.c
Extract WIM hard links correctly
[wimlib] / src / wim.c
index 6042a90c17809cf6a4fe74c5d84df4d2932a5cd9..45df3657f80c1c9e5b8adaf22c38a4576ec66e4a 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -208,7 +208,9 @@ int wimlib_select_image(WIMStruct *w, int image)
                if (!imd->modified) {
                        DEBUG("Freeing image %u", w->current_image);
                        destroy_image_metadata(imd, NULL);
                if (!imd->modified) {
                        DEBUG("Freeing image %u", w->current_image);
                        destroy_image_metadata(imd, NULL);
-                       memset(imd, 0, sizeof(*imd));
+                       imd->root_dentry = NULL;
+                       imd->security_data = NULL;
+                       imd->lgt = NULL;
                }
        }
 
                }
        }
 
@@ -526,7 +528,7 @@ WIMLIBAPI int wimlib_open_wim(const char *wim_file, int flags,
 
        ret = begin_read(w, wim_file, flags);
        if (ret != 0) {
 
        ret = begin_read(w, wim_file, flags);
        if (ret != 0) {
-               ERROR("Could not begin reading the WIM file `%s'", wim_file);
+               DEBUG("Could not begin reading the WIM file `%s'", wim_file);
                wimlib_free(w);
                return ret;
        }
                wimlib_free(w);
                return ret;
        }