]> wimlib.net Git - wimlib/blobdiff - src/dentry.c
write_dentry(): Remove unhelpful comment
[wimlib] / src / dentry.c
index eb7dbb63d4c0ac8390f5d829475f7214c981d125..3e462a6e38f472e623ab4ea887e257f05c257177 100644 (file)
@@ -1221,9 +1221,6 @@ read_dentry(const u8 * restrict buf, size_t buf_len,
        p = &buf[offset];
        disk_dentry = (const struct wim_dentry_on_disk*)p;
 
-       if (unlikely((uintptr_t)p & 7))
-               WARNING("WIM dentry is not 8-byte aligned");
-
        /* Get dentry length.  */
        length = le64_to_cpu(disk_dentry->length);
 
@@ -1378,18 +1375,6 @@ err_free_dentry:
        return ret;
 }
 
-static const tchar *
-dentry_get_file_type_string(const struct wim_dentry *dentry)
-{
-       const struct wim_inode *inode = dentry->d_inode;
-       if (inode_is_directory(inode))
-               return T("directory");
-       else if (inode_is_symlink(inode))
-               return T("symbolic link");
-       else
-               return T("file");
-}
-
 static bool
 dentry_is_dot_or_dotdot(const struct wim_dentry *dentry)
 {
@@ -1468,14 +1453,10 @@ read_dentry_tree_recursive(const u8 * restrict buf, size_t buf_len,
                        /* We already found a dentry with this same
                         * case-sensitive long name.  Only keep the first one.
                         */
-                       const tchar *child_type, *duplicate_type;
-                       child_type = dentry_get_file_type_string(child);
-                       duplicate_type = dentry_get_file_type_string(duplicate);
-                       WARNING("Ignoring duplicate %"TS" \"%"TS"\" "
-                               "(the WIM image already contains a %"TS" "
+                       WARNING("Ignoring duplicate file \"%"TS"\" "
+                               "(the WIM image already contains a file "
                                "at that path with the exact same name)",
-                               child_type, dentry_full_path(duplicate),
-                               duplicate_type);
+                               dentry_full_path(duplicate));
                        free_dentry(child);
                        continue;
                }
@@ -1671,11 +1652,6 @@ write_dentry(const struct wim_dentry * restrict dentry, u8 * restrict p)
        while ((uintptr_t)p & 7)
                *p++ = 0;
 
-       /* We calculate the correct length of the dentry ourselves because the
-        * dentry->length field may been set to an unexpected value from when we
-        * read the dentry in (for example, there may have been unknown data
-        * appended to the end of the dentry...).  Furthermore, the dentry may
-        * have been renamed, thus changing its needed length. */
        disk_dentry->length = cpu_to_le64(p - orig_p);
 
        if (use_dummy_stream) {