diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-28 09:38:51 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-28 09:38:51 (GMT) |
commit | b44555477cda94fd227969fd4a281daa0a1dbb52 (patch) | |
tree | 453a0ecb51ffa5b20e12c8e181d173a8b619e981 /library/cookiejar | |
parent | 4dd5bcda826982415475626e424d423e4f303ad8 (diff) | |
download | tcl-b44555477cda94fd227969fd4a281daa0a1dbb52.zip tcl-b44555477cda94fd227969fd4a281daa0a1dbb52.tar.gz tcl-b44555477cda94fd227969fd4a281daa0a1dbb52.tar.bz2 |
In cookiejar, don't depend on "lrange $pieces 0 -1" doing anything useful.
Diffstat (limited to 'library/cookiejar')
-rw-r--r-- | library/cookiejar/cookiejar.tcl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/cookiejar/cookiejar.tcl b/library/cookiejar/cookiejar.tcl index c8b495a..6c8e82b 100644 --- a/library/cookiejar/cookiejar.tcl +++ b/library/cookiejar/cookiejar.tcl @@ -98,7 +98,8 @@ namespace eval [info object namespace ::http::cookiejar] { } proc splitPath path { set pieces [split [string trimleft $path "/"] "/"] - for {set j -1} {$j < [llength $pieces]} {incr j} { + set result / + for {set j 0} {$j < [llength $pieces]} {incr j} { lappend result /[join [lrange $pieces 0 $j] "/"] } return $result |