commit 7839346b0eaea9a1cbb600dad3987f015c48611b
Author: Dan Gildea <dgildea>
Date:   Tue Sep 17 11:02:27 2024 +0200

    fix "-rootdir ."
    
    fix error message from empty dir name.
    
    fix bad links caused $FIXEDDIR being relative path while
    $DESTDIR was absolute path.

--- a/latex2html.pin
+++ b/latex2html.pin
@@ -782,6 +782,9 @@
 	$FILE =~ s/\.[^\.]*$//; ## AYS
 	$DESTDIR = ''; # start at empty
 	if ($FIXEDDIR) {
+	    # $FIXEDDIR is compared to $DESTDIR later
+	    #  so both need to be absolute paths
+	    $FIXEDDIR = L2hos->Make_directory_absolute($FIXEDDIR);
 	    $DESTDIR = $FIXEDDIR;
 	    if ($ROOTED) {
 		$DESTDIR .= $dd . $FILE unless $NO_SUBDIR;
@@ -1318,7 +1321,8 @@
 sub absolutize_path {
     my ($path) = @_;
     my $npath = '';
-    foreach $dir (split /$envkey/o, $path) {
+    foreach $dir (split /$envkey+/o, $path) {
+	# split regexp is designed to skip empty fields
         $npath .= L2hos->Make_directory_absolute($dir) . $envkey;
     }
     $npath =~ s/$envkey$//;
