[WM] download_tag.wmk: wrong relative download path on win2k
Ralph Pape
ralph.pape.web.de
Sat Jul 26 15:38:01 IST 2003
Hi all,
I'm using webmake 2.3 on a win2k box with activeperl 5.8.0.608.
I've detected a bug in webmake as I used the download_tag feature.
In the attached zip you can find a complete .wmk file that show the
problem in action. The dirs looks like:
raw/index
raw/Software/index
raw/Software/mimr/index
raw/Software/mimr/Download
download/mimr-0.1-src.zip
In the .wmk file you find:
<use plugin="download_tag" />
<option name="FileSearchPath" value="$(TOP/)download/" />
On each page in the raw dir I used <download file=mimr-0.1-src.zip/> to
refer to mimr-0.1.-src.zip.
Looking at index and Software/index the created relative link looks
fine. But in Software/mimr/index and Software/mimr/Download the
generated relativ path is wrong. It has to much ../
Searching the code I think I found the problem: commenting out the
'last if ( $fname ....' line was the solution on my win box.
I tried the the example with a unpatched and patched Webmake version on
a linux box and in both cases everything was ok.
Can someone explain me, why the code works in both cases under linux but
only in the commented out way on win2k?
Ralph
--- Main.pm.orig 2002-01-23 07:36:08.000000000 +0100
+++ Main.pm 2003-07-27 00:10:28.000000000 +0200
@@ -1757,7 +1757,7 @@
my $rhs = '';
while ($dotdots ne '') {
- last if ($fname =~ s,^\Q${dotdots}\E[\/\\],${rhs},);
+# last if ($fname =~ s,^\Q${dotdots}\E[\/\\],${rhs},);
last unless ($dotdots =~ s,[\/\\]([^\/\\]+)$,,);
$rhs .= '../';
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: download_tag.bug.zip
Type: application/zip
Size: 15062 bytes
Desc: not available
Url : http://amgod.boxhost.net/pipermail/webmake-talk/attachments/20030726/42ae34e4/download_tag.bug.zip
More information about the Webmake-talk
mailing list