From f6ed69a8d353678c003ac34da949559c3b9ac50f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 29 Dec 2005 13:08:27 +0000 Subject: [PATCH] don't record we synced flags if we didn't. --- src/sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sync.c b/src/sync.c index abd39b2..d4c4992 100644 --- a/src/sync.c +++ b/src/sync.c @@ -677,13 +677,13 @@ sync_boxes( store_t *ctx[], const char *names[], channel_conf_t *chan ) continue; } } - rflags = (nflags | aflags) & ~dflags; - if ((chan->ops[t] & OP_EXPUNGE) && (rflags & F_DELETED) && + if ((chan->ops[t] & OP_EXPUNGE) && (sflags & F_DELETED) && (!ctx[t]->conf->trash || ctx[t]->conf->trash_only_new)) { aflags &= F_DELETED; dflags = 0; } + rflags = (nflags | aflags) & ~dflags; switch ((aflags | dflags) ? driver[t]->set_flags( ctx[t], srec->msg[t], srec->uid[t], aflags, dflags ) : DRV_OK) { case DRV_STORE_BAD: ret = SYNC_BAD(t); goto finish; case DRV_BOX_BAD: ret = SYNC_FAIL; goto finish;