*/
/*
- * Copyright (C) 2012 Eric Biggers
+ * Copyright (C) 2012, 2013 Eric Biggers
*
* wimlib - Library for working with WIM files
*
imd->security_data = NULL;
INIT_HLIST_HEAD(&imd->inode_list);
}
- w->current_image = WIMLIB_NO_IMAGE;
}
-
- imd = wim_get_current_image_metadata(w);
+ w->current_image = image;
+ imd = &w->image_metadata[image - 1];
if (imd->root_dentry) {
ret = 0;
} else {
print_lookup_table_entry(imd->metadata_lte, stdout);
#endif
ret = read_metadata_resource(w, imd);
+ if (ret)
+ w->current_image = WIMLIB_NO_IMAGE;
}
- if (ret == 0)
- w->current_image = image;
return ret;
}
* closes all files associated with the WIMStruct. */
WIMLIBAPI void wimlib_free(WIMStruct *w)
{
- DEBUG2("Freeing WIMStruct");
+ DEBUG("Freeing WIMStruct");
if (!w)
return;
}
#endif
FREE(w);
+ DEBUG("Freed WIMStruct");
}
/* Get global memory allocations out of the way. Not strictly necessary in