changeset 541:c8aaf80bc89f HEAD

if virtual_size == physical_size in message, update it's binary-flag.
author Timo Sirainen <tss@iki.fi>
date Mon, 28 Oct 2002 10:12:29 +0200
parents 9194f598bfbd
children 14da2c45cdc7
files src/lib-index/mail-index-update.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-update.c	Mon Oct 28 09:53:55 2002 +0200
+++ b/src/lib-index/mail-index-update.c	Mon Oct 28 10:12:29 2002 +0200
@@ -402,6 +402,16 @@
 		update->index->update_field_raw(update, DATA_HDR_VIRTUAL_SIZE,
 						&uoff_size, sizeof(uoff_size));
 
+		/* update binary flags */
+		if (part->header_size.virtual_size ==
+		    part->header_size.physical_size)
+			update->rec->index_flags |=
+				INDEX_MAIL_FLAG_BINARY_HEADER;
+
+		if (part->body_size.virtual_size ==
+		    part->body_size.physical_size)
+			update->rec->index_flags |= INDEX_MAIL_FLAG_BINARY_BODY;
+
 		/* don't save both BODY + BODYSTRUCTURE since BODY can be
 		   generated from BODYSTRUCTURE. FIXME: However that takes
 		   CPU, maybe this should be configurable (I/O vs. CPU)? */