dovecot-2.0: mdbox: Handle better trying to copy an already purg...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jul 19 15:06:12 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/39d3894dc2f9
changeset: 11854:39d3894dc2f9
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jul 19 13:06:07 2010 +0100
description:
mdbox: Handle better trying to copy an already purged message.
It shouldn't log "refcount update lost map_uid" error.

diffstat:

 src/lib-storage/index/dbox-multi/mdbox-map.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 1e0916e4700c -r 39d3894dc2f9 src/lib-storage/index/dbox-multi/mdbox-map.c
--- a/src/lib-storage/index/dbox-multi/mdbox-map.c	Mon Jul 19 13:02:24 2010 +0100
+++ b/src/lib-storage/index/dbox-multi/mdbox-map.c	Mon Jul 19 13:06:07 2010 +0100
@@ -578,8 +578,14 @@
 	if (!mail_index_lookup_seq(map->view, map_uid, &seq)) {
 		/* we can't refresh map here since view has a
 		   transaction open. */
-		mdbox_map_set_corrupted(map, "refcount update lost map_uid=%u",
-					map_uid);
+		if (diff > 0) {
+			/* the message was probably just purged */
+			mail_storage_set_error(MAP_STORAGE(map), MAIL_ERROR_EXPUNGED,
+				"Some of the requested messages no longer exist.");
+		} else {
+			mdbox_map_set_corrupted(map,
+				"refcount update lost map_uid=%u", map_uid);
+		}
 		return -1;
 	}
 	mail_index_lookup_ext(map->view, seq, map->ref_ext_id,


More information about the dovecot-cvs mailing list