X-Git-Url: https://scripts.mit.edu/gitweb/www/ikiwiki.git/blobdiff_plain/10017feaec75703b484f4d4f066e9d77cc7625ce..bad740b94387d4289d6267715e09c2bedf1f210b:/IkiWiki/Plugin/aggregate.pm diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 5024975ac..6f9c78075 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -33,8 +33,10 @@ sub getopt () { #{{{ sub checkconfig () { #{{{ if ($config{aggregate} && ! ($config{post_commit} && IkiWiki::commit_hook_enabled())) { - # don't wait for the lock - IkiWiki::lockwiki(0) || exit 1; + if (! IkiWiki::lockwiki(0)) { + debug("wiki is locked by another process, not aggregating"); + exit 1; + } loadstate(); IkiWiki::loadindex(); @@ -126,8 +128,8 @@ my $state_loaded=0; sub loadstate () { #{{{ return if $state_loaded; if (-e "$config{wikistatedir}/aggregate") { - open (IN, "$config{wikistatedir}/aggregate" || - die "$config{wikistatedir}/aggregate: $!"); + open(IN, "$config{wikistatedir}/aggregate") || + die "$config{wikistatedir}/aggregate: $!"; while () { $_=IkiWiki::possibly_foolish_untaint($_); chomp; @@ -473,7 +475,7 @@ sub pagefile ($) { #{{{ } #}}} sub htmlfn ($) { #{{{ - return shift().".html"; + return shift().".".$config{htmlext}; } #}}} 1