diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-03-08 11:04:59 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-03-08 11:04:59 +0000 |
commit | 66a65b5ddd8963a66293ac90a01eb40daccaee03 (patch) | |
tree | d393b780416d9629661dc1a71f5999ff7d6536ad /IkiWiki | |
parent | 258c89e8413105677c2f2a39b2f57fda2abd794a (diff) | |
download | ikiwiki-66a65b5ddd8963a66293ac90a01eb40daccaee03.tar ikiwiki-66a65b5ddd8963a66293ac90a01eb40daccaee03.tar.gz |
* Correct a deadlock that could occur in post-commit if the aggregate plugin
was enabled and tried to lock the already locked wiki.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/aggregate.pm | 7 |
1 files changed, 4 insertions, 3 deletions
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 (@) { #{{{ |