# HG changeset patch # User Matt Mackall # Date 2007-04-16 14:51:50 # Node ID b633f470944e94c10348aeed07ea898b26032698 # Parent 9bfe93edfbb0e5aef004f0009d35f202340e42b2 hgweb: fix rfind bug in PATH_INFO handling diff --git a/mercurial/hgweb/hgweb_mod.py b/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