X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/8e8311718a0ca4d52aa86a9c8cc439430b11a468..d9bfe760d1c1e5ffc1bf990d79c4ea19d06092eb:/IkiWiki/Plugin/autoindex.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/autoindex.pm b/IkiWiki/Plugin/autoindex.pm index 78571b276..c443f01d2 100644 --- a/IkiWiki/Plugin/autoindex.pm +++ b/IkiWiki/Plugin/autoindex.pm @@ -46,6 +46,7 @@ sub genindex ($) { my $dir = $config{srcdir}; if (! $config{autoindex_commit}) { + no warnings 'once'; $dir = $IkiWiki::Plugin::transient::transientdir; } @@ -71,7 +72,6 @@ sub refresh () { my (%pages, %dirs); foreach my $dir ($config{srcdir}, @{$config{underlaydirs}}, $config{underlaydir}) { - next if $dir eq $IkiWiki::Plugin::transient::transientdir; chdir($dir) || next; find({ @@ -81,6 +81,7 @@ sub refresh () { $file=~s/^\.\/?//; return unless length $file; if (IkiWiki::file_pruned($file)) { + no warnings 'once'; $File::Find::prune=1; } elsif (! -l $_) { @@ -90,7 +91,7 @@ sub refresh () { if (! -d _) { $pages{pagename($f)}=1; } - elsif ($dir eq $config{srcdir}) { + elsif ($dir eq $config{srcdir} || ! $config{autoindex_commit}) { $dirs{$f}=1; } }