[WM] Fw: Problem with <media> tag
Simon McVittie
webmaker.pseudorandom.co.uk
Sun Sep 15 13:14:04 IST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Content-Type: text/plain; charset=us-ascii
> But now I have a problem that I'm getting absolute paths in the sitemap
> for all my media files. In the page they are attached to, the urls are
> correctly relative, but the sitemap filles in the absolute path, which
> is, of course, a spot on my local PC.
I've come across this bug myself; it seems to happen when you use the -d
option and Webmake doesn't trim off the base directory correctly. This
patch worked for me:
/// snip
diff -Naurib HTML-WebMake-2.3/lib/HTML/WebMake/DataSources/DirOfFiles.pm
HTML-WebMake-2.3smcv1/lib/HTML/WebMake/DataSources/DirOfFiles.pm
- --- HTML-WebMake-2.3/lib/HTML/WebMake/DataSources/DirOfFiles.pm 2001-12-06
05:58:02.000000000 +0000
+++ HTML-WebMake-2.3smcv1/lib/HTML/WebMake/DataSources/DirOfFiles.pm
2002-09-15 20:57:55.000000000 +0100
@@ -143,7 +143,8 @@
my $fixed = $self->{parent}->fixname ($name);
$self->{parent}->add_file_to_list ($fixed);
- - $self->{parent}->add_location ($fixed, "file:".$fname, $mtime);
+ my $vname = File::Spec->catfile ($src, $name);
+ $self->{parent}->add_location ($fixed, "file:".$vname, $mtime);
}
# and parse all the metadata files
\\\ snip
Hope this helps,
Simon McVittie
http://www.pseudorandom.co.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: OpenPGP key: http://www.pseudorandom.co.uk/ps/contact/
iD8DBQE9hOn0WSc8zVUw7HYRArACAKDXai7Z+yuZ8d0UjFQSL91ebdmUxACgskuC
SxjImahVGiv1yGHNxHO7sEA=
=J1uB
-----END PGP SIGNATURE-----
More information about the Webmake-talk
mailing list