From: Eric Wong Date: Fri, 3 Jan 2020 08:46:03 +0000 (+0000) Subject: searchidx: remove_message: pedantic fix for v1 X-Git-Tag: v1.3.0~142 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=2b189b48dee50f43042ba0f23ff374f62413fb2e;p=public-inbox.git searchidx: remove_message: pedantic fix for v1 It shouldn't be possible for v1 inboxes to have multiple matches for a given Message-ID, so the sub would only get called once, but strange things could happen in 2112 :> --- diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index ca1457fd..0d983aab 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -433,7 +433,7 @@ sub remove_message { batch_do($self, 'Q' . $mid, sub { my ($ids) = @_; $db->delete_document($_) for @$ids; - $nr = scalar @$ids; + $nr += scalar @$ids; }); }; if ($@) {