From 1db90e6d2b3774dfedb84f7de1e515a767336cee Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Wed, 26 Dec 2007 23:24:32 +0000 Subject: Fix Berlios Bug #11797, imap_mark_seen doesn't consider expunged messages (and marks the wrong messages seen after expunges, leading to data loss in 'keep flush' configurations). Report and patch by Alexander Cherepanov. Thanks\! svn path=/branches/BRANCH_6-3/; revision=5147 --- imap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'imap.c') diff --git a/imap.c b/imap.c index 053b607c..ec097eb5 100644 --- a/imap.c +++ b/imap.c @@ -1240,6 +1240,10 @@ static int imap_mark_seen(int sock, struct query *ctl, int number) /* mark the given message as seen */ { (void)ctl; + + /* expunges change the message numbers */ + number -= expunged; + return(gen_transact(sock, imap_version == IMAP4 ? "STORE %d +FLAGS.SILENT (\\Seen)" -- cgit v1.2.3