From: joey Date: Wed, 21 Feb 2007 09:12:20 +0000 (+0000) Subject: doh! X-Git-Tag: 1.44~40 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=67bc7ca8a117ce06506d8a38f58b573456406669;p=ikiwiki.git doh! --- diff --git a/IkiWiki.pm b/IkiWiki.pm index c8d959edd..dcb68bca6 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -621,11 +621,11 @@ sub unlockwiki () { #{{{ sub commit_hook_enabled () { #{{{ open(COMMITLOCK, "+>$config{wikistatedir}/commitlock") || error ("cannot write to $config{wikistatedir}/commitlock: $!"); - if (! flock(WIKILOCK, 1 | 4)) { # LOCK_SH | LOCK_NB to test - close WIKILOCK; + if (! flock(COMMITLOCK, 1 | 4)) { # LOCK_SH | LOCK_NB to test + close COMMITLOCK; return 0; } - close WIKILOCK; + close COMMITLOCK; return 1; } #}}}