- if (! exists $pages{$dir} && ! $deleted{$dir} &&
- grep /^$dir\/.*/, keys %pages) {
- if (exists $IkiWiki::pagemtime{$dir}) {
- # This page must have just been deleted, so
- # don't re-add it. And remember it was
- # deleted.
- if (! ref $pagestate{index}{autoindex}{deleted}) {
- $pagestate{index}{autoindex}{deleted}={};
- }
- ${$pagestate{index}{autoindex}{deleted}}{$dir}=1;
- }
- else {
- push @needed, $dir;
- }
- }
- }
-
- if (@needed) {
- if ($config{rcs}) {
- IkiWiki::disable_commit_hook();
- }
- genindex($_) foreach @needed;
- if ($config{rcs}) {
- IkiWiki::rcs_commit_staged(
- gettext("automatic index generation"),
- undef, undef);
- IkiWiki::enable_commit_hook();