# New Ticket Created by Philip Taylor # Please include the string: [perl #29302] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=29302 >
On a Windows system, File::Spec returns paths with backslashes. The HTML documentation generator (write_docs.pl etc) uses these paths in the HTML code, resulting in links like <a href=" docs\pdds\pdd00_pdd.pod.html">...</a> IE handles these with no problems. Firefox (0.8) follows the link to the right place, but then refers to itself as something like file:///e:/parrot/cvs/parrot/docs/html/docs%5Cpdds%5Cpdd00_pdd.pod.html (apparently forgetting that it used to think \ was a path delimiter and now considering it part of the filename) and so all the relative links in that page, like <a href="..\..\../html/index.html">Contents</a> (as well as all the images and stylesheets) are incorrect. All appears to work (in IE and Firefox) after changing relative_path() in lib/Parrot/IO/Directory.pm to replace backslashes with forward-slashes before returning. (The same can be achieved by altering the two link-generating bits in lib/Parrot/Docs/Item.pm, but I have no idea whether that would be a better place to do it.) -- Philip Taylor [EMAIL PROTECTED]
Index: parrot/lib/Parrot/IO/Directory.pm =================================================================== RCS file: /cvs/public/parrot/lib/Parrot/IO/Directory.pm,v retrieving revision 1.9 diff -u -b -r1.9 Directory.pm --- parrot/lib/Parrot/IO/Directory.pm 27 Mar 2004 22:22:54 -0000 1.9 +++ parrot/lib/Parrot/IO/Directory.pm 1 May 2004 17:00:40 -0000 @@ -161,7 +161,9 @@ $path = $path->path if ref $path; - return File::Spec->abs2rel($path, $self->path); + my $rel_path = File::Spec->abs2rel($path, $self->path); + $rel_path =~ tr~\\~/~; + return $rel_path; } =item C<parent()>