avoid clobbering origsub if checkconfig runs more than once
checkconfig can run more than once in a single ikiwiki run if setup is building wrappers. That clobbered the origsub value for bestlink, leading to infinite recursionmaster
parent
2ba54735ce
commit
ec26a96193
|
@ -152,8 +152,10 @@ sub checkconfig () {
|
||||||
$config{po_link_to}='default';
|
$config{po_link_to}='default';
|
||||||
}
|
}
|
||||||
unless ($config{po_link_to} eq 'default') {
|
unless ($config{po_link_to} eq 'default') {
|
||||||
$origsubs{'bestlink'}=\&IkiWiki::bestlink;
|
if (! exists $origsubs{'bestlink'}) {
|
||||||
inject(name => "IkiWiki::bestlink", call => \&mybestlink);
|
$origsubs{'bestlink'}=\&IkiWiki::bestlink;
|
||||||
|
inject(name => "IkiWiki::bestlink", call => \&mybestlink);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
push @{$config{wiki_file_prune_regexps}}, qr/\.pot$/;
|
push @{$config{wiki_file_prune_regexps}}, qr/\.pot$/;
|
||||||
|
|
Loading…
Reference in New Issue