]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Instead of hacking back to $link, just provide it.
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Thu, 27 Jun 2013 04:21:20 +0000 (00:21 -0400)
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Thu, 27 Jun 2013 04:21:20 +0000 (00:21 -0400)
IkiWiki/Plugin/inline.pm
IkiWiki/Plugin/meta.pm

index e313eb7755313ea051b14f43310168fb5750dd0e..455ac3ad55f4d468c80e5234816ba599f3527a33 100644 (file)
@@ -672,11 +672,7 @@ sub genfeed ($$$$$@) {
 
                        if (exists $pagestate{$p}{meta}{enclosure}) {
                                my $absurl = $pagestate{$p}{meta}{enclosure};
-
-                               # XXX better way to compute relative to srcdir?
-                               my $file = $absurl;
-                               $file =~ s|^$config{url}/||;
-
+                               my $file = $pagestate{$p}{meta}{enclosurefile};
                                genenclosure($itemtemplate, $absurl, $file);
                                $fancy_enclosure_seen = 1;
                        }
index 794f6d861dbfb8bb5ca9fc452ae089055768b432..e7b96bdf142f47e221e321b4ecb8ce68ab4989f8 100644 (file)
@@ -130,6 +130,7 @@ sub preprocess (@) {
 
                $value=urlto($link, $page, 1);
                $pagestate{$page}{meta}{enclosure}=$value;
+               $pagestate{$page}{meta}{enclosurefile}=$link;
                # fallthrough
        }
        elsif ($key eq 'author') {