From 0ace35bef5b69543b6444447a7acf9bed8a9efd6 Mon Sep 17 00:00:00 2001 From: Andrew DeFaria Date: Sat, 17 Jul 2021 17:39:14 -0700 Subject: [PATCH] Fixed bug where it was reporting the number of entries with retention --- maps/bin/mapsscrub.pl | 2 +- maps/lib/MAPS.pm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/maps/bin/mapsscrub.pl b/maps/bin/mapsscrub.pl index 8ff4c51..91e77a8 100755 --- a/maps/bin/mapsscrub.pl +++ b/maps/bin/mapsscrub.pl @@ -119,7 +119,7 @@ while (my $rec = GetUser) { } # while # Now optimize the database -if ($opts{optimized}) { +if ($opts{optimize}) { OptimizeDB; $log->msg('Database optimized'); diff --git a/maps/lib/MAPS.pm b/maps/lib/MAPS.pm index d63f9b9..705196e 100644 --- a/maps/lib/MAPS.pm +++ b/maps/lib/MAPS.pm @@ -544,6 +544,8 @@ sub CleanList(%) { return 0 unless $count; + $count = 0; + my ($err, $errmsg) = $db->find($table, $condition); croak "Unable to find $params{type} entries for $condition - $errmsg" if $err; -- 2.17.1