]> wimlib.net Git - wimlib/commitdiff
fix_true_inode(): Fix bug
authorEric Biggers <ebiggers3@gmail.com>
Fri, 21 Dec 2012 17:58:47 +0000 (11:58 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 21 Dec 2012 17:58:47 +0000 (11:58 -0600)
NEWS
src/hardlink.c

diff --git a/NEWS b/NEWS
index 1145194af0ad387eef28b95b48b41030dcb8e454..baafabaa4059c1b46558f7f389e8a80e86489dfc 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ Version 1.2.2:
        and should now be even faster.  (Although, they were already pretty
        fast--- much faster than typical I/O speeds.)
 
+       Fixed a bug introduced in v1.2.1 that would cause a directory tree
+       containing hard links to be captured incorrectly in some cases.
+
 Version 1.2.1:
        By default, unmounting a read-write mounted WIM with 'imagex unmount
        --commit' will now change the WIM in-place without needing to write the
index 7603670df55c8083146c15d2090bbe9e8315ef7a..93030d8f7e10e6b89874a089c28da575c63e850d 100644 (file)
@@ -278,6 +278,8 @@ static int fix_true_inode(struct inode *inode, struct hlist_head *inode_list)
                                return WIMLIB_ERR_INVALID_DENTRY;
                        }
                        /* Free the unneeded `struct inode'. */
+                       dentry->d_inode->hlist.next = NULL;
+                       dentry->d_inode->hlist.pprev = NULL;
                        free_inode(dentry->d_inode);
                        dentry->d_inode = ref_inode;
                        ref_inode->link_count++;