mercurial/hgweb/hgweb_mod.py
changeset 4349 69109aa0cddd
parent 4346 c593e502f7fd
parent 4348 b633f470944e
child 4457 e19d9b1223ee
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -703,7 +703,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