diff mercurial/hgweb/hgweb_mod.py @ 4346:c593e502f7fd

Merge with stable
author Matt Mackall <mpm@selenic.com>
date Sun, 15 Apr 2007 18:42:38 -0500
parents aa26759c6fb3 26a2fa9433b8
children 69109aa0cddd
line wrap: on
line diff
--- 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[:-len(pi)]
+                        root = root[:root.rfind(root, pi)]
                     if req.env.has_key('REPO_NAME'):
                         rn = req.env['REPO_NAME'] + '/'
                         root += rn