Browse Source

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.
wip/maildir-path-under-inbox
Oswald Buddenhagen 3 years ago
parent
commit
eab4a12a63
  1. 2
      src/sync_state.c

2
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;
}

Loading…
Cancel
Save