]> wimlib.net Git - wimlib/blobdiff - src/hardlink.c
Win32: Fix drive root detection with \\?\-style paths
[wimlib] / src / hardlink.c
index 7c82f4bae09487aae4638c58ce9e738d999db610..5e2c62618ad43b5e2641d97a31cb86f899425e97 100644 (file)
@@ -346,6 +346,13 @@ fix_nominal_inode(struct wim_inode *inode, struct list_head *inode_list,
 
        wimlib_assert(inode->i_nlink == inode_link_count(inode));
 
+       if (inode->i_nlink > 1 &&
+           (inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY))
+       {
+               ERROR("Found unsupported directory hard link!");
+               return WIMLIB_ERR_INVALID_DENTRY;
+       }
+
        LIST_HEAD(dentries_with_data_streams);
        LIST_HEAD(dentries_with_no_data_streams);
        HLIST_HEAD(true_inodes);