diff -r 2442927cdd96 -r 250f3168d907 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Sun Mar 04 13:03:22 2018 -0500 +++ b/mercurial/hgweb/webcommands.py Sun Mar 04 13:04:12 2018 -0500 @@ -495,7 +495,7 @@ dirs = {} parity = paritygen(web.stripecount) - if path and path[-1] != "/": + if path and path[-1:] != "/": path += "/" l = len(path) abspath = "/" + path