+09Oct06=======================================================================
+1. fix problems with bad filters pointed by Thomas DL3SBB.
27Jul06=======================================================================
1. merge in official issue version of wpxloc.raw (with one change: 4U1V).
26Jul06=======================================================================
$in = undef;
my $s = readfilestr($fn);
my $newin = eval $s;
- dbg($@) if $@;
+ if ($@) {
+ dbg($@);
+ unlink($fn);
+ return undef;
+ }
if ($in) {
$newin = new('Filter::Old', $sort, $call, $flag);
$newin->{filter} = $in;
- } else {
+ } elsif (ref $newin && $newin->can('getfilkeys')) {
my $filter;
my $key;
foreach $key ($newin->getfilkeys) {
$newin->compile($key, 'reject');
$newin->compile($key, 'accept');
}
+ } else {
+ # error on reading file, delete and exit
+ unlink($fn);
+ return undef;
}
return $newin;
}