From ab8125d62aa8fe26ad3f0771d2a8af580ca89564 Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 26 Aug 2007 17:38:17 +0000 Subject: * Fix a bug in unlockwiki intorduced last version that made it crash ikiwiki if it wasn't locked when called. This is known to break post-commit emails. --- IkiWiki.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index a89d9c252..18a518f3f 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -774,7 +774,8 @@ sub lockwiki (;$) { #{{{ } #}}} sub unlockwiki () { #{{{ - return close($wikilock); + return close($wikilock) if $wikilock; + return; } #}}} my $commitlock; @@ -800,7 +801,8 @@ sub disable_commit_hook () { #{{{ } #}}} sub enable_commit_hook () { #{{{ - return close($commitlock); + return close($commitlock) if $commitlock; + return; } #}}} sub loadindex () { #{{{ -- cgit v1.2.3