- int ret;
- WIMStruct *w = wim;
-
- /* Verify the associated inode, but only one time no matter how many
- * dentries it has (unless we are doing a full verification of the WIM,
- * in which case we need to force the inode to be verified again.) */
- if (!dentry->d_inode->i_verified) {
- ret = verify_inode(dentry->d_inode, w);
- if (ret)
- return ret;
- }
-
- /* Make sure root dentry is unnamed, while every other dentry has at
- * least a long name.
- *
- * I am assuming that dentries having only a DOS name is illegal; i.e.,
- * Windows will always combine the Win32 name and DOS name for a file
- * into a single WIM dentry, even if they are stored separately on NTFS.
- * (This seems to be the case...) */
- if (dentry_is_root(dentry)) {
- if (dentry_has_long_name(dentry) || dentry_has_short_name(dentry)) {
- WARNING("The root dentry has a nonempty name");
- FREE(dentry->file_name);
- FREE(dentry->short_name);
- dentry->file_name = NULL;
- dentry->short_name = NULL;
- dentry->file_name_nbytes = 0;
- dentry->short_name_nbytes = 0;
+ if (lte->refcnt != lte->real_refcnt) {
+ if (wimlib_print_errors) {
+ WARNING("The following lookup table entry has a reference "
+ "count of %u, but", lte->refcnt);
+ WARNING("We found %u references to it",
+ lte->real_refcnt);
+ print_lookup_table_entry(lte, stderr);