commit ceb09fcd44246ab7dad1a352b29854b6b86c3ddf
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Tue Jul 21 16:10:28 2020 +0200

    handle messages which are newly doomed after an interruption
    
    we already didn't propagate messages which would be instantly expunged
    from the target, but failed to cancel propagations that were already
    scheduled before we got interrupted. this matters a bit when the
    resumption happens significantly later than the initial attempt, giving
    the user time to mark messages on the source as deleted.

 src/sync.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/sync.c b/src/sync.c
index 7ffd180..64ecaa3 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -1593,7 +1593,13 @@ box_loaded( int sts, message_t *msgs, int total_msgs, 
int recent_msgs, void *aux
                                 : svars->newmaxuid[1-t] < tmsg->uid && 
(svars->chan->ops[t] & OP_NEW)) {
                                debug( "new message %u on %s\n", tmsg->uid, 
str_fn[1-t] );
                                if ((svars->chan->ops[t] & OP_EXPUNGE) && 
(tmsg->flags & F_DELETED)) {
-                                       debug( "-> ignoring - would be expunged 
anyway\n" );
+                                       if (srec) {
+                                               JLOG( "- %u %u", (srec->uid[F], 
srec->uid[N]), "killing - would be expunged anyway" );
+                                               tmsg->srec = NULL;
+                                               srec->status = S_DEAD;
+                                       } else {
+                                               debug( "-> ignoring - would be 
expunged anyway\n" );
+                                       }
                                } else {
                                        if (srec) {
                                                debug( "-> pair(%u,%u) 
exists\n", srec->uid[F], srec->uid[N] );


_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to