Skip to content

Commit e59d1de

Browse files
committed
Remove the "Not honoring directory hard link" warning message
This message trips when capturing hard-linked symlinks to directories on Linux. But symlinks are immutable, so un-hard-linking them is not a big deal. Just remove this warning message. Resolves https://wimlib.net/forums/viewtopic.php?t=820
1 parent 4a34203 commit e59d1de

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

src/inode_table.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,19 @@ inode_table_new_dentry(struct wim_inode_table *table, const tchar *name,
131131
hlist_for_each_entry(inode, list, i_hlist_node) {
132132
if (inode->i_ino != ino || inode->i_devno != devno)
133133
continue;
134-
if (inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY) {
135-
WARNING("Not honoring directory hard link "
136-
"of \"%"TS"\"",
137-
inode_any_full_path(inode));
134+
/*
135+
* Since the WIM file format does not support directory
136+
* hard links, automatically un-hard-link any that are
137+
* found. We no longer print a warning when doing this,
138+
* considering that this condition trips when capturing
139+
* hard-linked symlinks to directories on Linux. (Those
140+
* get translated into "directory reparse points",
141+
* despite not being directories originally. And
142+
* un-hard-linking them doesn't really matter.)
143+
*/
144+
if (inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY)
138145
continue;
139-
}
146+
140147
/* Inode found; use it. */
141148
return new_dentry_with_existing_inode(name, inode,
142149
dentry_ret);

0 commit comments

Comments
 (0)