=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.4 retrieving revision 1.6 diff -u -p -r1.4 -r1.6 --- cvsweb/cvsweb.cgi 1997/02/03 20:47:12 1.4 +++ cvsweb/cvsweb.cgi 1997/04/30 07:35:11 1.6 @@ -469,15 +469,18 @@ if (-d $fullname) { print &html_footer; print "\n"; } else { + # Assume it's a module name with a potential path following it. + $where =~ s|/.*||; + $xtra = $&; # Is there an indexed version of modules? if (open(MODULES, "$cvsroot/CVSROOT/modules")) { while () { - if (/^${where}\s+(\S+)/o && -d "${cvsroot}/$1") { - &redirect($scriptname . '/' . $1); + if (/^${where}\s+(\S+)/o && -d "${cvsroot}/$1" && ($1 ne $where)) { + &redirect($scriptname . '/' . $1 . $xtra); } } } - &fatal("404 Not Found","$where: no such file or directory"); + &fatal("404 Not Found","$where$xtra: no such file or directory"); } sub htmlify { @@ -502,7 +505,7 @@ sub revcmp { local(@r2) = split(/\./, $rev2); local($a,$b); - while (($a = pop(@r1)) && ($b = pop(@r2))) { + while (($a = shift(@r1)) && ($b = shift(@r2))) { if ($a != $b) { return $a <=> $b; }