+
+ /* Currently ignoring this test because wimlib does not apply DOS names
+ * to a file with hard links (see apply_dentry_ntfs()). */
+#if 0
+ /* Files cannot have multiple DOS names, even if they have multiple
+ * names in multiple directories (i.e. hard links) ??? XXX */
+ 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;
+ }
+ }
+#endif
+
+ /* 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;
+ }
+