]> wimlib.net Git - wimlib/blobdiff - src/inode_fixup.c
ntfs-3g_capture.c: fix capture of empty named data stream
[wimlib] / src / inode_fixup.c
index 616c5ff39eaee5dcabdd987e4c1ba185da1c7f92..6929cf7a417cf85185842a7c7f3da0f54e2ddfab 100644 (file)
@@ -53,8 +53,8 @@ inodes_consistent(const struct wim_inode *inode_1,
         * doesn't link the dentries.)
         *
         * For non-buggy WIMs this function will always return true.  */
-       return hashes_equal(inode_unnamed_stream_hash(inode_1),
-                           inode_unnamed_stream_hash(inode_2));
+       return hashes_equal(inode_get_hash_of_unnamed_data_stream(inode_1),
+                           inode_get_hash_of_unnamed_data_stream(inode_2));
 }
 
 static int
@@ -102,10 +102,8 @@ inode_table_insert(struct wim_dentry *dentry, void *_params)
                        continue;
                }
                /* Transfer this dentry to the existing inode.  */
-               free_inode(d_inode);
-               dentry->d_inode = inode;
-               inode->i_nlink++;
-               inode_add_dentry(dentry, inode);
+               d_disassociate(dentry);
+               d_associate(dentry, inode);
                return 0;
        }