|
@@ -393,7 +393,7 @@ sub parse_dir
|
|
|
{
|
|
{
|
|
|
print "Going into $conf->{logdir} and parsing all files there...\n\n";
|
|
print "Going into $conf->{logdir} and parsing all files there...\n\n";
|
|
|
my @filesarray;
|
|
my @filesarray;
|
|
|
- opendir(LOGDIR, $conf->{logdir}) || die("can't opendir $conf->{logdir}: $!");
|
|
|
|
|
|
|
+ opendir(LOGDIR, $conf->{logdir}) or die("Can't opendir $conf->{logdir}: $!");
|
|
|
unless (@filesarray = readdir(LOGDIR)) {
|
|
unless (@filesarray = readdir(LOGDIR)) {
|
|
|
die("No files in $conf->{logdir}!");
|
|
die("No files in $conf->{logdir}!");
|
|
|
}
|
|
}
|
|
@@ -406,9 +406,11 @@ sub parse_dir
|
|
|
|
|
|
|
|
my $parsed = 0;
|
|
my $parsed = 0;
|
|
|
foreach my $file (grep /^$conf->{prefix}/, @filesarray) {
|
|
foreach my $file (grep /^$conf->{prefix}/, @filesarray) {
|
|
|
- $file = $conf->{logdir} . $file;
|
|
|
|
|
- parse_file($file);
|
|
|
|
|
- $parsed = 1;
|
|
|
|
|
|
|
+ unless ($file eq "." or $file eq "..") {
|
|
|
|
|
+ $file = $conf->{logdir} . $file;
|
|
|
|
|
+ parse_file($file);
|
|
|
|
|
+ $parsed = 1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
die "No files matched prefix $conf->{prefix} in directory $conf->{logdir}" unless ($parsed);
|
|
die "No files matched prefix $conf->{prefix} in directory $conf->{logdir}" unless ($parsed);
|