diff --git a/data/cgi/cvsweb.cgi b/data/cgi/cvsweb.cgi index eb17b49f66..dfe818ab94 100755 --- a/data/cgi/cvsweb.cgi +++ b/data/cgi/cvsweb.cgi @@ -475,12 +475,12 @@ if (-d $fullname) { # Is there an indexed version of modules? if (open(MODULES, "$cvsroot/CVSROOT/modules")) { while () { - if (/^${where}\s+(\S+)/o && -d "${cvsroot}/$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 { diff --git a/en/cgi/cvsweb.cgi b/en/cgi/cvsweb.cgi index eb17b49f66..dfe818ab94 100755 --- a/en/cgi/cvsweb.cgi +++ b/en/cgi/cvsweb.cgi @@ -475,12 +475,12 @@ if (-d $fullname) { # Is there an indexed version of modules? if (open(MODULES, "$cvsroot/CVSROOT/modules")) { while () { - if (/^${where}\s+(\S+)/o && -d "${cvsroot}/$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 {