X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fhardlink.c;h=5e2c62618ad43b5e2641d97a31cb86f899425e97;hp=7c82f4bae09487aae4638c58ce9e738d999db610;hb=1c940d499beb539f846ed2509e3fee7772adf250;hpb=55491147fce2bc03ffb602a3985e7fd4e32169a3 diff --git a/src/hardlink.c b/src/hardlink.c index 7c82f4ba..5e2c6261 100644 --- a/src/hardlink.c +++ b/src/hardlink.c @@ -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);