]> wimlib.net Git - wimlib/blobdiff - src/dentry.h
Alignment of ADS entries
[wimlib] / src / dentry.h
index 2f51ecd8823d65b893e2075487a0e0da1a455e87..ac4454f9e442bc014232468a42c6ba03c050bc92 100644 (file)
@@ -66,7 +66,8 @@ struct ads_entry {
 
 static inline u64 ads_entry_length(const struct ads_entry *entry)
 {
 
 static inline u64 ads_entry_length(const struct ads_entry *entry)
 {
-       return WIM_ADS_ENTRY_DISK_SIZE + entry->stream_name_len;
+       u64 len = WIM_ADS_ENTRY_DISK_SIZE + entry->stream_name_len + 2;
+       return (len + 7) & ~7;
 }
 
 /* In-memory structure for a directory entry.  There is a directory tree for
 }
 
 /* In-memory structure for a directory entry.  There is a directory tree for