}
} #}}}
+sub unlockwiki () { #{{{
+ close WIKILOCK;
+} #}}}
+
sub loadindex () { #{{{
open (IN, "$config{srcdir}/.ikiwiki/index") || return;
while (<IN>) {
} #}}}
sub refresh () { #{{{
- # Find existing pages.
+ # find existing pages
my %exists;
my @files;
-
eval q{use File::Find};
find({
no_chdir => 1,
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;
# presumably the commit will trigger an update
# of the wiki
rcs_commit($message);
+ # prevent deadlock with post-commit hook
+ unlockwiki();
}
else {
loadindex();