]> git.donarmstrong.com Git - debbugs.git/commitdiff
fix failure to save spam/ham records
authorDon Armstrong <don@donarmstrong.com>
Thu, 14 Dec 2017 23:39:01 +0000 (15:39 -0800)
committerDon Armstrong <don@donarmstrong.com>
Thu, 14 Dec 2017 23:39:01 +0000 (15:39 -0800)
Debbugs/Log/Spam.pm

index 2c3ca8735b53fa155c0322dede38a690923ec130..e5ed18f1c8f4441890f62b8a134797807313a315 100644 (file)
@@ -164,12 +164,12 @@ sub save {
     binmode($fh,':encoding(UTF-8)');
     for my $msgid (keys %{$self->{spam}}) {
         # was this message set to spam/ham by .d? If so, don't save it
-        if ($self->{spam} ne '0' and
-            $self->{spam} ne '1') {
+        if ($self->{spam}{$msgid} ne '0' and
+            $self->{spam}{$msgid} ne '1') {
             next;
         }
         print {$fh} $msgid;
-        if ($self->{spam} eq '0') {
+        if ($self->{spam}{$msgid} eq '0') {
             print {$fh} ' ham';
         }
         print {$fh} "\n";