[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-mail.c, 1.22.2.1, 1.22.2.2

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


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

Modified Files:
      Tag: branch_1_0
	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.22.2.1
retrieving revision 1.22.2.2
diff -u -d -r1.22.2.1 -r1.22.2.2
--- maildir-mail.c	11 Jun 2006 14:06:08 -0000	1.22.2.1
+++ maildir-mail.c	17 Jun 2006 22:44:55 -0000	1.22.2.2
@@ -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