You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by pa...@apache.org on 2004/02/26 23:43:30 UTC

svn commit: rev 6889 - incubator/spamassassin/trunk/lib/Mail/SpamAssassin

Author: parker
Date: Thu Feb 26 14:43:28 2004
New Revision: 6889

Modified:
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/CmdLearn.pm
Log:
when reading a file specified with -f it was adding more than one target, one of which was bogus

Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/CmdLearn.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/CmdLearn.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/CmdLearn.pm	Thu Feb 26 14:43:28 2004
@@ -217,10 +217,13 @@
       open (F, $opt{folders}) || die $!;
       while (<F>) {
 	chomp;
+	next unless ($_);
 	if (/^(?:ham|spam):/) {
 	  push(@targets, $_);
 	}
-	target($_);
+	else {
+	  target($_);
+	}
       }
       close (F);
     }