isync

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

commit e686f88318b4c493a747afbf3895344b87f9f903
parent 51673214abae762f16c8d4eab67152f7cb703da7
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Wed,  1 Dec 2021 11:25:06 +0100

don't complain about concurrent flagging as deleted

the result of propagating a deletion is flagging as deleted, so shut up
if the only remote change is exactly that.

Diffstat:
Msrc/sync.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/sync.c b/src/sync.c @@ -1696,7 +1696,11 @@ box_loaded( int sts, message_t *msgs, int total_msgs, int recent_msgs, void *aux JLOG( "> %u %u 0", (srec->uid[F], srec->uid[N]), "near side expired, orphaning far side" ); srec->uid[N] = 0; } else { - if (srec->msg[t] && (srec->msg[t]->status & M_FLAGS) && srec->msg[t]->flags != srec->flags) + if (srec->msg[t] && (srec->msg[t]->status & M_FLAGS) && + // Ignore deleted flag, as that's what we'll change ourselves ... + (((srec->msg[t]->flags & ~F_DELETED) != (srec->flags & ~F_DELETED)) || + // ... except for undeletion, as that's the opposite. + (!(srec->msg[t]->flags & F_DELETED) && (srec->flags & F_DELETED)))) notice( "Notice: conflicting changes in (%u,%u)\n", srec->uid[F], srec->uid[N] ); if (svars->chan->ops[t] & OP_DELETE) { debug( " %sing delete\n", str_hl[t] );