You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/05/05 16:59:46 UTC
svn commit: r535536 - /spamassassin/trunk/masses/rule-qa/corpus-hourly
Author: jm
Date: Sat May 5 07:59:45 2007
New Revision: 535536
URL: http://svn.apache.org/viewvc?view=rev&rev=535536
Log:
rm on solaris will not delete CWD -- work around by cd'ing to / before running it
Modified:
spamassassin/trunk/masses/rule-qa/corpus-hourly
Modified: spamassassin/trunk/masses/rule-qa/corpus-hourly
URL: http://svn.apache.org/viewvc/spamassassin/trunk/masses/rule-qa/corpus-hourly?view=diff&rev=535536&r1=535535&r2=535536
==============================================================================
--- spamassassin/trunk/masses/rule-qa/corpus-hourly (original)
+++ spamassassin/trunk/masses/rule-qa/corpus-hourly Sat May 5 07:59:45 2007
@@ -22,7 +22,7 @@
use File::Path;
use File::Copy;
use Time::ParseDate;
-use Cwd;
+use Cwd 'abs_path';
use POSIX qw(nice strftime);
use constant WEEK => 60*60*24;
@@ -78,11 +78,12 @@
&locate;
¤t;
&clean_up;
+exit;
sub configure {
# does rough equivalent of source
open(C, $configuration) || die "open failed: $configuration: $!\n";
- my $pwd = getcwd;
+ my $pwd = Cwd::getcwd;
# add 'override' options
my @lines = (<C>, split(/\|/, $opt_override));
@@ -100,6 +101,7 @@
}
sub clean_up {
+ chdir "/";
system "rm -rf $opt{tmp}/*.$$ ".join(' ', @tmps);
}
@@ -366,7 +368,7 @@
print OUT "# spam results used for $daterev $class $age: " . join(" ", @spam) . "\n";
print OUT "# ".log_metadata_xml($daterev, @ham, @spam)."\n";
- push (@tmps, $tmpfname);
+ push (@tmps, abs_path($tmpfname));
my $flags = "";
$flags = "-t net -s 1" if $class eq "NET";