aboutsummaryrefslogtreecommitdiff
path: root/www/w3mir/files/patch-w3mfix.PL
blob: 6094ed3f2c4a62a6971e098ff9ed0f2bd57abad0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- w3mfix.PL.bak	Mon Feb  5 00:21:47 2001
+++ w3mfix.PL	Sun Apr 17 21:56:24 2005
@@ -686,12 +686,15 @@
 
 	substr($lf_url,0,0)='./' unless substr($lf_url,0,1) eq '/';
 
+	my($slash)=($lf_url =~ /^\//);
 	$lf_url_o=url $lf_url;
 	my $tmp=$lf_url_o->clone;
 	$tmp->basename($indexname);
+	my($tpath)=$tmp->unix_path;
+	$tpath =~ s~^/~~ if (!$slash);
 
 	if ( $doindex && $lf_url_o->basename eq "" && 
-	     &stat($tmp->unix_path) eq 'f' &&
+	     &stat($tpath) eq 'f' &&
 	     !$htmlop::isdir{$key}) {
 	  $lf_url_o=$tmp;
 	  $il=1;