Fix to handle 'implicit dir paths' (ie., paths that match a dir but have no trailing /) properly in menu

This commit is contained in:
Uriel 2008-07-04 22:49:05 +02:00
parent 81baf713e6
commit 0dba064c8e

View file

@ -53,7 +53,7 @@ fn menu {
path = $0 "/" path = $0 "/"
} }
if(index(ENVIRON["REQUEST_URI"], "/" path) == 1) { if(index(ENVIRON["REQUEST_URI"] "/", "/" path) == 1) {
if(isdir) { if(isdir) {
print "<li><a href=\"/" path "\" class=\"thisPage\">&raquo;<i> " bname "</i></a>" print "<li><a href=\"/" path "\" class=\"thisPage\">&raquo;<i> " bname "</i></a>"
system("rc -c ''menu " path "''") system("rc -c ''menu " path "''")