dovecot-2.0: maildir: Write only base filenames to uidlist.

dovecot at dovecot.org dovecot at dovecot.org
Wed Oct 6 21:19:53 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/cc969ee7074b
changeset: 12256:cc969ee7074b
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Oct 06 19:19:48 2010 +0100
description:
maildir: Write only base filenames to uidlist.
Previously the old filename was used to guess the initial filename, but
nowadays we do that by building the filename based on flags in index.

diffstat:

 src/lib-storage/index/maildir/maildir-uidlist.c |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 84014f0baaf4 -r cc969ee7074b src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c	Wed Oct 06 19:08:43 2010 +0100
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c	Wed Oct 06 19:19:48 2010 +0100
@@ -1234,6 +1234,7 @@
 	struct maildir_uidlist_rec *rec;
 	string_t *str;
 	const unsigned char *p;
+	const char *strp;
 	unsigned int len;
 	int ret;
 
@@ -1285,7 +1286,13 @@
 				p += len + 1;
 			}
 		}
-		str_printfa(str, " :%s\n", rec->filename);
+		str_append(str, " :");
+		strp = strchr(rec->filename, ':');
+		if (strp == NULL)
+			str_append(str, rec->filename);
+		else
+			str_append_n(str, rec->filename, strp - rec->filename);
+		str_append_c(str, '\n');
 		o_stream_send(output, str_data(str), str_len(str));
 	}
 	maildir_uidlist_iter_deinit(&iter);


More information about the dovecot-cvs mailing list