X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fdentry.c;h=f9126eb0d3fb3a5aba037729a5322f08273f1690;hp=f176f0b9dba405efcc2c9acbc2c4fd402a26d819;hb=f26dccb787fa4d83108dbb9d6843063ae262df3a;hpb=140c0920af14b19292e8b7694bb91864c8f52f3c diff --git a/src/dentry.c b/src/dentry.c index f176f0b9..f9126eb0 100644 --- a/src/dentry.c +++ b/src/dentry.c @@ -1068,6 +1068,8 @@ struct ads_entry *inode_add_ads(struct inode *inode, const char *stream_name) struct ads_entry *ads_entries; struct ads_entry *new_entry; + DEBUG("Add alternate data stream `%s'", stream_name); + if (inode->num_ads >= 0xfffe) { ERROR("Too many alternate data streams in one inode!"); return NULL; @@ -1087,6 +1089,7 @@ struct ads_entry *inode_add_ads(struct inode *inode, const char *stream_name) #ifdef WITH_FUSE new_entry->stream_id = inode->next_stream_id++; #endif + inode->num_ads = num_ads; return new_entry; } #endif @@ -1693,8 +1696,7 @@ static u8 *write_dentry(const struct dentry *dentry, u8 *p) } /* Align to 8-byte boundary */ - wimlib_assert(length >= (p - orig_p) - && length - (p - orig_p) <= 7); + wimlib_assert(length >= (p - orig_p) && length - (p - orig_p) <= 7); p = put_zeroes(p, length - (p - orig_p)); /* Write the alternate data streams, if there are any. Please see @@ -1713,9 +1715,7 @@ static u8 *write_dentry(const struct dentry *dentry, u8 *p) } p = put_zeroes(p, (8 - (p - orig_p) % 8) % 8); } -#ifdef ENABLE_ASSERTIONS wimlib_assert(p - orig_p == __dentry_total_length(dentry, length)); -#endif return p; }