+ find({
+ no_chdir => 1,
+ wanted => sub {
+ $_=decode_utf8($_);
+ if (/$config{wiki_file_prune_regexp}/) {
+ $File::Find::prune=1;
+ }
+ elsif (! -d $_ && ! -l $_) {
+ my ($f)=/$config{wiki_file_regexp}/; # untaint
+ if (! defined $f) {
+ warn("skipping bad filename $_\n");
+ }
+ else {
+ # Don't add files that are in the
+ # srcdir.
+ $f=~s/^\Q$config{underlaydir}\E\/?//;
+ if (! -e "$config{srcdir}/$f" &&
+ ! -l "$config{srcdir}/$f") {
+ push @files, $f;
+ $exists{pagename($f)}=1;
+ }
+ }
+ }
+ },
+ }, $config{underlaydir});