[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-mail.c, 1.24, 1.25

cras at dovecot.org cras at dovecot.org
Sun Jun 18 01:44:59 EEST 2006


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

Modified Files:
	maildir-mail.c 
Log Message:
If requested mail isn't found from uidlist, mark the mail as expunged.         



Index: maildir-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-mail.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- maildir-mail.c	16 Jun 2006 09:40:40 -0000	1.24
+++ maildir-mail.c	17 Jun 2006 22:44:57 -0000	1.25
@@ -137,8 +137,10 @@
 	if (_mail->uid != 0) {
 		fname = maildir_uidlist_lookup(mbox->uidlist, _mail->uid,
 					       &flags);
-		if (fname == NULL)
+		if (fname == NULL) {
+			_mail->expunged = TRUE;
 			return (uoff_t)-1;
+		}
 	} else {
 		fname = maildir_save_file_get_path(_mail->transaction,
 						   _mail->seq);
@@ -167,6 +169,10 @@
 		if (_mail->uid != 0) {
 			fname = maildir_uidlist_lookup(mbox->uidlist,
 						       _mail->uid, &flags);
+			if (fname == NULL) {
+				_mail->expunged = TRUE;
+				return NULL;
+			}
 		} else {
 			fname = maildir_save_file_get_path(_mail->transaction,
 							   _mail->seq);
@@ -195,8 +201,10 @@
 	if (_mail->uid != 0) {
 		fname = maildir_uidlist_lookup(mbox->uidlist, _mail->uid,
 					       &flags);
-		if (fname == NULL)
+		if (fname == NULL) {
+			_mail->expunged = TRUE;
 			return (uoff_t)-1;
+		}
 	} else {
 		fname = maildir_save_file_get_path(_mail->transaction,
 						   _mail->seq);



More information about the dovecot-cvs mailing list