From 66a65b5ddd8963a66293ac90a01eb40daccaee03 Mon Sep 17 00:00:00 2001 From: joey Date: Thu, 8 Mar 2007 11:04:59 +0000 Subject: * Correct a deadlock that could occur in post-commit if the aggregate plugin was enabled and tried to lock the already locked wiki. --- IkiWiki/Plugin/aggregate.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'IkiWiki') diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index b1b069b00..bdbcd536f 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -31,15 +31,16 @@ sub getopt () { #{{{ } #}}} sub checkconfig () { #{{{ - IkiWiki::lockwiki(); + my $nolock=($config{post_commit} && ! commit_hook_enabled()); + IkiWiki::lockwiki() unless $nolock; loadstate(); - if ($config{aggregate}) { + if ($config{aggregate} && ! $nolock) { IkiWiki::loadindex(); aggregate(); expire(); savestate(); } - IkiWiki::unlockwiki(); + IkiWiki::unlockwiki() unless $nolock; } #}}} sub filter (@) { #{{{ -- cgit v1.2.3