closedir $dh;
$cats{$pth} = \@entries;
} else {
- die "unacceptable filename: $pth" if $_ eq "index";
my @s = stat($fn) or die "$!";
$sizes{$pth} = $s[7];
$mtimes{$pth} = strftime "%Y-%m-%d %H:%M:%S", gmtime $s[9];
use File::Path qw(make_path);
foreach my $cat (keys %cats) {
make_path "$ARGV[1]/$cat";
+ next if (exists $mtimes{"$cat/index"});
my $fn = "$ARGV[1]/$cat/index.html";
open(my $fh, ">", $fn) or die "$!";
genIndex $fh, $cat;