Commit 2d2318a3 authored by Admin's avatar Admin
Browse files

ansgar improvement suggestion;

parent b725f98e
......@@ -2593,15 +2593,18 @@ sub HandleArchiving {
$file =~ s/%./.+/g; # ??? WTF IS THIS?
$dir = ResolveDateWildcards($dir, localtime(gettimeofday()));
return if (!opendir(my $DH, $dir));
return if (!opendir my $DH, $dir);
my @files = sort grep {/^$file$/} readdir($DH);
my @files = grep {/^$file$/} readdir $DH;
if (AttrVal('global', 'archivesort', 'alphanum') eq 'timestamp') {
@files = map { $_->[0] }
sort { $a->[1] <=> $b->[1] }
map { [ $_, (stat("$dir/$_"))[9] ] } @files;
}
else {
@files = sort @files;
}
closedir $DH;
my $max = @files - $nra;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment