+
+ /* Files cannot have multiple DOS names, even if they have multiple
+ * names in multiple directories (i.e. hard links).
+ * Source: NTFS-3g authors. */
+ const struct wim_dentry *dentry_with_dos_name = NULL;
+ inode_for_each_dentry(dentry, inode) {
+ if (dentry->short_name_len) {
+ if (dentry_with_dos_name) {
+ ERROR("Hard-linked file has a DOS name at "
+ "both `%s' and `%s'",
+ dentry_with_dos_name->full_path_utf8,
+ dentry->full_path_utf8);
+ goto out;
+ }
+ dentry_with_dos_name = dentry;
+ }
+ }
+
+ /* Directories with multiple links have not been tested. XXX */
+ if (inode->i_nlink > 1 && inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY) {
+ ERROR("Hard-linked directory `%s' is unsupported",
+ first_dentry->full_path_utf8);
+ goto out;
+ }
+
+ inode->i_verified = 1;