]> sipb.mit.edu Git - ikiwiki.git/commitdiff
meta: depend on absolute page name, not relative
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Thu, 18 Jun 2009 14:32:55 +0000 (15:32 +0100)
committerJoey Hess <joey@gnu.kitenet.net>
Sat, 15 Aug 2009 17:50:55 +0000 (13:50 -0400)
Previously, [[!meta redir="foo"]] on bar, where bar/foo exists, would
depend on "foo" (which matches nothing, probably) rather than "bar/foo".
(cherry picked from commit f27ec09b72f886415e63fe394e18d9c3cb3913bf)

IkiWiki/Plugin/meta.pm

index b2295923e31d94ed8d393a09d1ebeb2f05604878..514b0936907ce58edabcbafcb44d5559a154eec9 100644 (file)
@@ -191,11 +191,11 @@ sub preprocess (@) {
                if ($value !~ /^\w+:\/\//) {
                        my ($redir_page, $redir_anchor) = split /\#/, $value;
 
-                       add_depends($page, $redir_page);
                        my $link=bestlink($page, $redir_page);
                        if (! length $link) {
                                error gettext("redir page not found")
                        }
+                       add_depends($page, $link);
 
                        $value=urlto($link, $page);
                        $value.='#'.$redir_anchor if defined $redir_anchor;