# to detect an error. Real Programmers don't handle errors,
# right? >sigh<
$! = 0;
- @result = grep {
- ($_ ne '.' and $_ ne '..')
- and $_ = "$MAILDIR/new/$_"
- } readdir(DIR);
-
+ @result = readdir(DIR);
if ($! != 0) {
die("readdir($dir): $!");
}
@baton = spam_start_hook();
foreach $msg (@msglist) {
+ ($msg eq '.' or $msg eq '..') and next;
+
if ($printfilenames) {
print("$msg\n");
}
exit;
}
+ chdir("$MAILDIR/new") or die("chdir($MAILDIR/new): $!");
filter_mail(map { $_->[1] }
sort { $a->[0] <=> $b->[0] }
map {
}
[$st->mtime, $_]
}
- getfiles("$MAILDIR/new"));
+ getfiles('.'));
@SPAM and (exec('scan', '+SPAM', @SPAM) or die);
}