dovecot-2.2: maildir: If GUID can't be preserved in filename due...

dovecot at dovecot.org dovecot at dovecot.org
Wed Apr 9 14:05:31 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/a7e3ea778ce1
changeset: 17205:a7e3ea778ce1
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Apr 09 17:05:12 2014 +0300
description:
maildir: If GUID can't be preserved in filename due to size change, set it in dovecot-uidlist
This fixes problems with dsync when zlib is used and filenames/GUIDs don't
contain (correct) S=sizes.

diffstat:

 src/lib-storage/index/maildir/maildir-save.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 49c7cc58fb1b -r a7e3ea778ce1 src/lib-storage/index/maildir/maildir-save.c
--- a/src/lib-storage/index/maildir/maildir-save.c	Tue Apr 08 17:07:31 2014 +0200
+++ b/src/lib-storage/index/maildir/maildir-save.c	Wed Apr 09 17:05:12 2014 +0300
@@ -606,6 +606,9 @@
 		/* e.g. zlib plugin was used. the "physical size" must be in
 		   the maildir filename, since stat() will return wrong size */
 		ctx->file_last->preserve_filename = FALSE;
+		/* preserve the GUID if needed */
+		if (ctx->file_last->guid == NULL)
+			ctx->file_last->guid = ctx->file_last->dest_basename;
 		/* reset the base name as well, just in case there's a
 		   ,W=vsize */
 		ctx->file_last->dest_basename = ctx->file_last->tmp_name;


More information about the dovecot-cvs mailing list