X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2a8e2af9a2bc131db3f966f8235cd743da84b83e..b19d19df7ab9d5d6a3ba1887d52457fed44c1333:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 91d2e6082..dc9b66344 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -403,6 +403,13 @@ sub getsetup () { #{{{ safe => 0, rebuild => 0, }, + wikistatedir => { + type => "internal", + default => undef, + description => "path to the .ikiwiki directory holding ikiwiki state", + safe => 0, + rebuild => 0, + }, setupfile => { type => "internal", default => undef, @@ -467,7 +474,7 @@ sub checkconfig () { #{{{ } $config{wikistatedir}="$config{srcdir}/.ikiwiki" - unless exists $config{wikistatedir}; + unless exists $config{wikistatedir} && defined $config{wikistatedir}; if (defined $config{umask}) { umask(possibly_foolish_untaint($config{umask})); @@ -1894,6 +1901,10 @@ sub match_link ($$;@) { #{{{ else { return IkiWiki::SuccessReason->new("$page links to page $p matching $link") if match_glob($p, $link, %params); + $p=~s/^\///; + $link=~s/^\///; + return IkiWiki::SuccessReason->new("$page links to page $p matching $link") + if match_glob($p, $link, %params); } } return IkiWiki::FailReason->new("$page does not link to $link");