+ 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;
+ }