X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/7dd110ba51c738e249ea974b71f85477c543e5bc..cc1f18cecb35816ffc711e94c8419d01642db806:/IkiWiki/Plugin/autoindex.pm diff --git a/IkiWiki/Plugin/autoindex.pm b/IkiWiki/Plugin/autoindex.pm index dede9eb05..c443f01d2 100644 --- a/IkiWiki/Plugin/autoindex.pm +++ b/IkiWiki/Plugin/autoindex.pm @@ -33,9 +33,6 @@ sub checkconfig () { if (! defined $config{autoindex_commit}) { $config{autoindex_commit} = 1; } - if (! $config{autoindex_commit}) { - $config{only_committed_changes}=0; - } } sub genindex ($) { @@ -49,6 +46,7 @@ sub genindex ($) { my $dir = $config{srcdir}; if (! $config{autoindex_commit}) { + no warnings 'once'; $dir = $IkiWiki::Plugin::transient::transientdir; } @@ -74,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({ @@ -84,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 $_) { @@ -93,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; } }