]> Sergey Matveev's repositories - zk.git/commitdiff
No problems with "index" file
authorSergey Matveev <stargrave@stargrave.org>
Thu, 8 May 2025 07:57:08 +0000 (10:57 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 8 May 2025 07:58:00 +0000 (10:58 +0300)
zk

diff --git a/zk b/zk
index 3742ee34f5959b5379c3606d3910299ac8c7f513..b28c2fbf7afda118158382d736200071c2447d82 100755 (executable)
--- a/zk
+++ b/zk
@@ -139,7 +139,6 @@ my %cats;
             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];
@@ -336,6 +335,7 @@ if ($ARGV[0] eq "dump") {
     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;