mercurial/hgweb/hgweb_mod.py
changeset 45316 1b983985edd9
parent 45315 2901133ec982
child 45317 c37ab438ff31
--- a/mercurial/hgweb/hgweb_mod.py	Wed Aug 05 13:58:30 2020 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Aug 05 14:03:14 2020 -0700
@@ -82,8 +82,8 @@
             locations = (os.path.join(style, b'map'), b'map-' + style, b'map')
 
             for location in locations:
-                mapfile = os.path.join(path, location)
-                if os.path.isfile(mapfile):
+                mapfile, fp = templater.open_template(location, path)
+                if mapfile:
                     return style, mapfile
 
     raise RuntimeError(b"No hgweb templates found in %r" % path)