changeset 12256:cc969ee7074b

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.
author Timo Sirainen <tss@iki.fi>
date Wed, 06 Oct 2010 19:19:48 +0100
parents 84014f0baaf4
children 8d36d8f5fcef
files src/lib-storage/index/maildir/maildir-uidlist.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);