[patch] Fix dirindexing subdirectory links in ClientHTTPBase.pm

Mark Smith junior at danga.com
Tue Dec 13 20:21:42 UTC 2005


Fred,

Thanks for noting this.  I've committed the patch with some other little
things that just generally clean this code up:

    http://www.livejournal.com/community/changelog/2496237.html

Thanks again!


On Sat, Dec 10, 2005, Fred Moyer wrote:
> Hello,
> 
> I noticed that for dirindexing = 1 option Perlbal was not generating the 
> correct hrefs for subdirectories.  The following patch fixes that issue.
> 
> - Fred
> 
> --- ClientHTTPBase.pm	2005-12-10 16:20:24.000000000 -0800
> +++ ClientHTTPBase.pm	2005-12-10 16:27:21.000000000 -0800
> @@ -450,9 +450,9 @@
>          opendir(D, $file);
>          foreach my $de (sort readdir(D)) {
>              if (-d "$file/$de") {
> -                $body .= "<b><a href='$de/'>$de</a></b><br />\n";
> +                $body .= "<b><a href='$uri$de/'>$de</a></b><br />\n";
>              } else {
> -                $body .= "<a href='$de'>$de</a><br />\n";
> +                $body .= "<a href='$uri$de'>$de</a><br />\n";
>              }
>          }
>          closedir(D);


--
Junior (aka Mark Smith)
junior at danga.com

Software Engineer
Six Apart / Danga Interactive


More information about the perlbal mailing list