[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-save.c, 1.85, 1.86

cras at dovecot.org cras at dovecot.org
Tue Jul 12 15:24:18 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv26795/lib-storage/index/mbox

Modified Files:
	mbox-save.c 
Log Message:
Keywords weren't saved to index while saving.



Index: mbox-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-save.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- mbox-save.c	4 Jul 2005 11:32:28 -0000	1.85
+++ mbox-save.c	12 Jul 2005 12:24:16 -0000	1.86
@@ -374,10 +374,13 @@
 		if (!mbox->ibox.keep_recent)
 			save_flags &= ~MAIL_RECENT;
 
-		// FIXME: set keywords
 		mail_index_append(ctx->trans, ctx->next_uid, &ctx->seq);
 		mail_index_update_flags(ctx->trans, ctx->seq, MODIFY_REPLACE,
 					save_flags);
+		if (keywords != NULL) {
+			mail_index_update_keywords(ctx->trans, ctx->seq,
+						   MODIFY_REPLACE, keywords);
+		}
 
 		offset = ctx->output->offset == 0 ? 0 :
 			ctx->output->offset - 1;
@@ -385,6 +388,7 @@
 				      mbox->mbox_ext_idx, &offset, NULL);
 		ctx->next_uid++;
 
+		/* parse and cache the mail headers as we read it */
 		if (ctx->mail == NULL)
 			ctx->mail = index_mail_alloc(_t, 0, NULL);
 		mail_set_seq(ctx->mail, ctx->seq);



More information about the dovecot-cvs mailing list