dovecot: Fixed handling expunges.

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 16 13:21:45 EET 2008


details:   http://hg.dovecot.org/dovecot/rev/9137bd313e04
changeset: 7247:9137bd313e04
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Feb 16 13:21:37 2008 +0200
description:
Fixed handling expunges.

diffstat:

1 file changed, 7 insertions(+), 1 deletion(-)
src/plugins/fts-squat/squat-trie.c |    8 +++++++-

diffs (20 lines):

diff -r 077a8ccac8af -r 9137bd313e04 src/plugins/fts-squat/squat-trie.c
--- a/src/plugins/fts-squat/squat-trie.c	Fri Feb 15 14:51:57 2008 +0200
+++ b/src/plugins/fts-squat/squat-trie.c	Sat Feb 16 13:21:37 2008 +0200
@@ -1201,9 +1201,15 @@ squat_uidlist_update_expunged_uids(const
 				array_delete(uids_arr, uid_idx, 1);
 				uids = array_get_modifiable(uids_arr,
 							    &uid_count);
-			} else {
+			} else if (do_shifts) {
 				/* the next loop iteration fixes the UIDs */
 				uids[uid_idx].seq1 += child_shift_count;
+			} else {
+				seq_range_array_remove_range(uids_arr,
+							     shift.seq1,
+							     shift.seq2);
+				uids = array_get_modifiable(uids_arr,
+							    &uid_count);
 			}
 			shift_sum += child_shift_count;
 		}


More information about the dovecot-cvs mailing list