[patch] Fix dirindexing subdirectory links in ClientHTTPBase.pm

Fred Moyer fred at redhotpenguin.com
Sun Dec 11 00:31:09 UTC 2005


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);


More information about the perlbal mailing list