Mailing List Archive

svn commit: r230376 - /spamassassin/trunk/masses/rule-qa/corpus-hourly
Author: jm
Date: Thu Aug 4 17:58:22 2005
New Revision: 230376

URL: http://svn.apache.org/viewcvs?rev=230376&view=rev
Log:
deal with the case where a flagfile doesn't exist

Modified:
spamassassin/trunk/masses/rule-qa/corpus-hourly

Modified: spamassassin/trunk/masses/rule-qa/corpus-hourly
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/masses/rule-qa/corpus-hourly?rev=230376&r1=230375&r2=230376&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-qa/corpus-hourly (original)
+++ spamassassin/trunk/masses/rule-qa/corpus-hourly Thu Aug 4 17:58:22 2005
@@ -246,9 +246,12 @@
print STDERR "ham (NET $age): " . join(' ', @ham) . "\n";
print STDERR "spam (NET $age): " . join(' ', @spam) . "\n";
}
- elsif ($age =~ /^(?:new|all|age)$/) {
- @ham = grep { -M "$_" < -M $opt{tagtime} } @ham;
- @spam = grep { -M "$_" < -M $opt{tagtime} } @spam;
+ elsif ($age =~ /^(?:new|all|age)$/)
+ {
+ my $tt = (-M $opt{tagtime});
+ @ham = grep { !defined($tt) || ((-M "$_") < $tt) } @ham;
+ @spam = grep { !defined($tt) || ((-M "$_") < $tt) } @spam;
+
if (!$opt{ignore_revisions}) {
@ham = grep { $revision{$_} eq $revision } @ham;
@spam = grep { $revision{$_} eq $revision } @spam;