diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2016-11-22 19:41:46 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2016-11-22 19:41:46 +0100 |
commit | 986edff592c159cb9057e960f380057ff06da939 (patch) | |
tree | 8f4adac764133cf52848eb3b1cd00a399c137a5f | |
parent | d33c699343282fae32e0b966c17377595ee52db0 (diff) |
bugfix: when resuming a sync, only consider UIDs greater than a known UIDNEXT.
-rwxr-xr-x | interimap | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1088,6 +1088,18 @@ while (defined (my $row = $STH_LIST_INTERRUPTED->fetchrow_arrayref())) { # the _MODIFIED internal cache has been initialized with all our # UIDs. (Since there is no reliable HIGHESTMODSEQ, any flag # difference is treated as a conflict.) + $STH_GET_CACHE_BY_IDX->execute($IDX); + if (defined (my $cache = $STH_GET_CACHE_BY_IDX->fetchrow_hashref())) { + $lIMAP->set_cache($cache->{mailbox}, + UIDVALIDITY => $cache->{lUIDVALIDITY}, + UIDNEXT => $cache->{lUIDNEXT} + ); + $rIMAP->set_cache($cache->{mailbox}, + UIDVALIDITY => $cache->{rUIDVALIDITY}, + UIDNEXT => $cache->{rUIDNEXT} + ); + die if defined $STH_GET_CACHE_BY_IDX->fetch(); # sanity check + } sync_messages($IDX, $MAILBOX, [keys %lList], [keys %rList]); } |