From 2b189b48dee50f43042ba0f23ff374f62413fb2e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 3 Jan 2020 08:46:03 +0000 Subject: 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 :> --- lib/PublicInbox/SearchIdx.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/SearchIdx.pm') 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 ($@) { -- cgit v1.2.3-24-ge0c7