From: Don Armstrong Date: Thu, 14 Dec 2017 23:46:34 +0000 (-0800) Subject: fix $is_match of mark_it X-Git-Tag: release/2.6.0~40 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=acb3bb95d3e9eb46e40fb7881294ab5ae0d87441 fix $is_match of mark_it --- diff --git a/bin/debbugs-spam b/bin/debbugs-spam index f416fb3..cd4fbd6 100755 --- a/bin/debbugs-spam +++ b/bin/debbugs-spam @@ -192,10 +192,13 @@ sub mark_it { if ($mid =~ /\Q$regex\E/) { $is_match = 1; } - if ($spam_ham eq 'spam') { - $spam->add_spam($mid); - } else { - $spam->add_ham($mid); + if ($is_match) { + print STDERR "it's a match" if $DEBUG; + if ($spam_ham eq 'spam') { + $spam->add_spam($mid); + } else { + $spam->add_ham($mid); + } } }, $bug_num