mercurial/hgweb.py
changeset 1649 beb7da710c8a
parent 1646 8e9c203946ae
child 1650 f2ebd5251e88
--- a/mercurial/hgweb.py
+++ b/mercurial/hgweb.py
@@ -580,6 +580,8 @@ class hgweb(object):
         files = {}
 
         p = path[1:]
+        if p and p[-1] != "/":
+            p += "/"
         l = len(p)
 
         for f,n in mf.items():