]> wimlib.net Git - wimlib/commitdiff
unix_capture.c: Force directories to separate inodes
authorEric Biggers <ebiggers3@gmail.com>
Sun, 27 Apr 2014 03:50:04 +0000 (22:50 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 27 Apr 2014 03:52:36 +0000 (22:52 -0500)
Freeing the dentry tree goes horribly wrong if there are directory hard
links, so don't allow creating them.

src/unix_capture.c

index dd79b658e0238cc9f15ed3d039ef1285e2dc9015..9283df513585b8a2ecbd074aeb82d942a0b79390 100644 (file)
@@ -244,7 +244,8 @@ unix_build_dentry_tree_recursive(struct wim_dentry **root_ret,
 
        ret = inode_table_new_dentry(&params->inode_table,
                                     path_basename_with_len(path, path_len),
-                                    stbuf.st_ino, stbuf.st_dev, false, &root);
+                                    stbuf.st_ino, stbuf.st_dev,
+                                    S_ISDIR(stbuf.st_mode), &root);
        if (ret)
                goto out;