$catter = $cmd;
}
else {
- # Find the first non-empty file
+ # Find the first non-empty file, newest first
$catter = "cat ".quotemeta($file);
if (!-s $file && $config{'compressed'}) {
- foreach $l (&all_log_files($file)) {
+ foreach $l (reverse(&all_log_files($file))) {
next if (!-s $l);
$c = &catter_command($l);
if ($c) {
opendir(DIR, &translate_filename($dir));
foreach $f (readdir(DIR)) {
local $trans = &translate_filename("$dir/$f");
- if ($f =~ /^\Q$base\E/ && -f $trans) {
+ if ($f =~ /^\Q$base\E/ && -f $trans && $f !~ /\.offset$/) {
push(@rv, "$dir/$f");
$mtime{"$dir/$f"} = [ stat($trans) ];
}