[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-mail.c, 1.7, 1.8

cras at dovecot.org cras at dovecot.org
Sun Dec 19 08:36:15 EET 2004


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

Modified Files:
	maildir-mail.c 
Log Message:
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.



Index: maildir-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-mail.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- maildir-mail.c	28 Aug 2004 10:32:17 -0000	1.7
+++ maildir-mail.c	19 Dec 2004 06:36:12 -0000	1.8
@@ -145,6 +145,23 @@
 	return index_mail_get_virtual_size(_mail);
 }
 
+static const char *
+maildir_mail_get_special(struct mail *_mail, enum mail_fetch_field field)
+{
+	struct index_mail *mail = (struct index_mail *)_mail;
+	enum maildir_uidlist_rec_flag flags;
+	const char *fname, *end;
+
+	if (field == MAIL_FETCH_UIDL_FILE_NAME) {
+	    	fname = maildir_uidlist_lookup(mail->ibox->uidlist,
+					       mail->mail.uid, &flags);
+		end = strchr(fname, ':');
+		return end == NULL ? fname : t_strdup_until(fname, end);
+	}
+
+	return index_mail_get_special(_mail, field);
+}
+							
 static uoff_t maildir_mail_get_physical_size(struct mail *_mail)
 {
 	struct index_mail *mail = (struct index_mail *)_mail;
@@ -223,7 +240,7 @@
 	index_mail_get_header,
 	index_mail_get_headers,
 	maildir_mail_get_stream,
-	index_mail_get_special,
+	maildir_mail_get_special,
 	index_mail_update_flags,
 	index_mail_expunge
 };



More information about the dovecot-cvs mailing list