Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -r1.25.2.2 -r1.25.2.3 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 11 Oct 2002 16:01:01 -0000 1.25.2.2 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 21 Nov 2002 23:27:06 -0000 1.25.2.3 @@ -700,15 +700,21 @@ ad_proc -private rp_path_prefixes {path} { Returns all the prefixes of a path ordered from most to least specific. } { - set path [string trimright $path /] if {[string index $path 0] != "/"} { set path "/$path" } + set path [string trimright $path /] + if { [string length $path] == 0 } { + return "/" + } + set components [split $path "/"] set prefixes [list] - for {set i [expr [llength $components] -1]} {$i >= 0} {incr i -1} { + for {set i [expr [llength $components] -1]} {$i > 0} {incr i -1} { lappend prefixes "[join [lrange $components 0 $i] "/"]/" + lappend prefixes "[join [lrange $components 0 $i] "/"]" } + lappend prefixes "/" return $prefixes }