From: Guilhem Moulin Date: Wed, 29 Jul 2015 22:39:58 +0000 (+0200) Subject: Don't initialize cache for ignore mailboxes. X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=d1c7440ee9c925e036472044c74b3b8d9268cd99;p=interimap.git Don't initialize cache for ignore mailboxes. --- diff --git a/imapsync b/imapsync index 498fb82..ae6bc79 100755 --- a/imapsync +++ b/imapsync @@ -1041,6 +1041,7 @@ while (defined (my $row = $STH_LIST_INTERRUPTED->fetchrow_arrayref())) { my %KNOWN_INDEXES; $STH_GET_CACHE->execute(); while (defined (my $row = $STH_GET_CACHE->fetchrow_hashref())) { + next unless grep {$row->{mailbox} eq $_} @MAILBOXES; $lIMAP->set_cache($row->{mailbox}, UIDVALIDITY => $row->{lUIDVALIDITY}, UIDNEXT => $row->{lUIDNEXT}, @@ -1061,7 +1062,7 @@ if (defined $COMMAND and $COMMAND eq 'repair') { while(1) { - while(1) { + while(@MAILBOXES) { my $cache; my $update = 0; if (defined $MAILBOX and ($lIMAP->is_dirty($MAILBOX) or $rIMAP->is_dirty($MAILBOX))) {