X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/fd2683b8a106703b92053a075059924ceed8c6f0..22f3f422af7e25460fbfe92de54e3fa45bbc7ff7:/ikiwiki?ds=sidebyside diff --git a/ikiwiki b/ikiwiki index fd9904e3d..e218979d1 100755 --- a/ikiwiki +++ b/ikiwiki @@ -420,6 +420,10 @@ sub lockwiki () { #{{{ } } #}}} +sub unlockwiki () { #{{{ + close WIKILOCK; +} #}}} + sub loadindex () { #{{{ open (IN, "$config{srcdir}/.ikiwiki/index") || return; while () { @@ -564,10 +568,9 @@ sub prune ($) { #{{{ } #}}} sub refresh () { #{{{ - # Find existing pages. + # find existing pages my %exists; my @files; - eval q{use File::Find}; find({ no_chdir => 1, @@ -608,7 +611,7 @@ sub refresh () { #{{{ foreach my $page (keys %oldpagemtime) { if (! $exists{$page}) { debug("removing old page $page"); - push @del, $renderedfiles{$page}; + push @del, $pagesources{$page}; prune($config{destdir}."/".$renderedfiles{$page}); delete $renderedfiles{$page}; $oldpagemtime{$page}=0; @@ -1131,6 +1134,8 @@ sub cgi_editpage ($$) { #{{{ # presumably the commit will trigger an update # of the wiki rcs_commit($message); + # prevent deadlock with post-commit hook + unlockwiki(); } else { loadindex();