shithub: werc

Download patch

ref: a45fb36bc5e4f28601d95f22d9703258d03053f9
parent: fa12af1c6f4643ca49f54b7b7a15a1efe82bdd76
author: uriel <uriel@suckless.org>
date: Fri Jul 4 18:49:05 EDT 2008

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

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