hgweb: fix rfind bug in PATH_INFO handling
authorMatt Mackall <mpm@selenic.com>
Mon, 16 Apr 2007 09:51:50 -0500
changeset 4348 b633f470944e
parent 4345 9bfe93edfbb0
child 4349 69109aa0cddd
child 4350 3380eb6d7c32
child 4354 8aee687f0214
hgweb: fix rfind bug in PATH_INFO handling
mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -716,7 +716,7 @@ class hgweb(object):
                     # strip leading /
                     pi = pi[1:]
                     if pi:
-                        root = root[:root.rfind(root, pi)]
+                        root = root[:root.rfind(pi)]
                     if req.env.has_key('REPO_NAME'):
                         rn = req.env['REPO_NAME'] + '/'
                         root += rn