isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit eab4a12a632b14436a4c595676a921fdc0d17319
parent 0da273686f7ca5a5be7b27cc27480b52465fea24
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Thu, 14 Apr 2022 14:30:25 +0200

make sure that entries with deleted placeholders are pruned

we need to copy the S_DEL status bits when upgrading sync entries, so
that when a placeholder is flagged at the same time for both deletion
and upgrade, the entry pruning loop sees that the dummy message got
expunged.

note that we don't mask any bits, so the post-split entries may end up
with S_DEL for a zero UID - which doesn't matter.

Diffstat:
Msrc/sync_state.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sync_state.c b/src/sync_state.c @@ -615,7 +615,7 @@ upgrade_srec( sync_vars_t *svars, sync_rec_t *srec, int t ) // Mark the original entry for upgrade. srec->status = (srec->status & ~(S_DUMMY(F) | S_DUMMY(N))) | S_PENDING | S_UPGRADE; // Mark the placeholder for nuking. - nsrec->status = S_PURGE; + nsrec->status = S_PURGE | (srec->status & (S_DEL(F) | S_DEL(N))); nsrec->aflags[t] = F_DELETED; return nsrec; }