]> wimlib.net Git - wimlib/blobdiff - src/dentry.c
Make a printf() into a DEBUG()
[wimlib] / src / dentry.c
index 6f6822ed03a4e748185e8e816560ed9ea7a254ab..d2a45990aee830d810673b13a1ab518d7563f406 100644 (file)
@@ -32,6 +32,7 @@
 #include "io.h"
 #include "timestamp.h"
 #include "lookup_table.h"
+#include "sha1.h"
 #include <unistd.h>
 #include <sys/stat.h>
 
@@ -750,7 +751,11 @@ static u8 *write_dentry(const struct dentry *dentry, u8 *p)
        p = put_u64(p, dentry->creation_time);
        p = put_u64(p, dentry->last_access_time);
        p = put_u64(p, dentry->last_write_time);
-       p = put_bytes(p, WIM_HASH_SIZE, dentry->hash);
+       if (!is_empty_file_hash(dentry->hash))
+               memcpy(p, dentry->hash, WIM_HASH_SIZE);
+       else
+               DEBUG("zero hash for %s\n", dentry->file_name_utf8);
+       p += WIM_HASH_SIZE;
        p = put_u32(p, 0); /* reparse_tag */
        p = put_u64(p, dentry->hard_link);
        p = put_u16(p, 0); /*streams */