ref: 46f8e7215b76200d3330dd11da018f044d80c2ea
parent: 1c5828e4fbccc779e36e293ebc3de41b2ae92fbc
author: uriel <uriel@vm41.cat-v.org>
date: Wed Aug 5 22:20:58 EDT 2009
Fix bug where incorrect elements in the navigation sidebar were highlighted, thanks to arg for reporting this.
--- a/bin/corehandlers.rc
+++ b/bin/corehandlers.rc
@@ -26,7 +26,11 @@
path = $0 d
gsub(/[\-_]/, " ", bname)
- if(index(ENVIRON["req_path"] "/", path) == 1)
+ # To avoid false matches add trailing / even for plain files to act as delimiter
+ pa = path
+ gsub(/[^\/]$/, "&/", pa)
+
+ if(index(ENVIRON["req_path"] "/", pa) == 1)
print "<li><a href=\"" path "\" class=\"thisPage\">»<i> " bname "</i></a></li>"
else
print "<li><a href=\"" path "\">› " bname "</a></li>"