use post-sync "seen" flag to determine expirability

otherwise it wouldn't be idempotent.
This commit is contained in:
Oswald Buddenhagen 2013-11-09 11:25:40 +01:00
parent 15216947fb
commit 9e186ae88b

View File

@ -1380,7 +1380,7 @@ box_loaded( int sts, void *aux )
if (nflags & F_FLAGGED) {
/* Flagged messages are always kept. */
todel--;
} else if ((tmsg->flags & F_SEEN) &&
} else if ((nflags & F_SEEN) &&
(todel > 0 ||
((srec->status & (S_EXPIRE|S_EXPIRED)) == (S_EXPIRE|S_EXPIRED)) ||
((srec->status & (S_EXPIRE|S_EXPIRED)) && (tmsg->flags & F_DELETED)))) {