Browse Source

do not exclude oversized messages from remote trashing

... as otherwise these messages would be just lost.

the assumption is that opposite-side trashing is used only for locally
generated messages whose size we control. it's also more consistent with
same-side trashing, where even oversized messages would be trashed.

the exclusion was broken anyway, as we failed to query the size of old
messages, particularly after 70bad661.
wip/maildir-path-under-inbox
Oswald Buddenhagen 3 years ago
parent
commit
4b0c5a0cd5
  1. 13
      src/sync.c

13
src/sync.c

@ -1579,27 +1579,16 @@ msgs_flags_set( sync_vars_t *svars, int t )
debug( "was already trashed\n" ); debug( "was already trashed\n" );
continue; continue;
} }
if (!remote) {
debug( "- trashing\n" ); debug( "- trashing\n" );
trash_total[t]++; trash_total[t]++;
stats(); stats();
svars->trash_pending[t]++; svars->trash_pending[t]++;
if (!remote) {
tv = nfmalloc( sizeof(*tv) ); tv = nfmalloc( sizeof(*tv) );
tv->aux = AUX; tv->aux = AUX;
tv->msg = tmsg; tv->msg = tmsg;
svars->drv[t]->trash_msg( svars->ctx[t], tmsg, msg_trashed, tv ); svars->drv[t]->trash_msg( svars->ctx[t], tmsg, msg_trashed, tv );
} else { } else {
if (tmsg->size > svars->ctx[t^1]->conf->max_size) {
// This is questionable, as these messages are actually lost
// (no upgradable dummies here).
// However, this is an unlikely configuration to start with ...
debug( "is too big\n" );
continue;
}
debug( "- trashing\n" );
trash_total[t]++;
stats();
svars->trash_pending[t]++;
cv = nfmalloc( sizeof(*cv) ); cv = nfmalloc( sizeof(*cv) );
cv->cb = msg_rtrashed; cv->cb = msg_rtrashed;
cv->aux = INV_AUX; cv->aux = INV_AUX;

Loading…
Cancel
Save