mercurial/hgweb/webcommands.py
changeset 45398 dc9fe90bdbd5
parent 45397 da3b7c80aa34
child 46417 914ca0a98518
--- a/mercurial/hgweb/webcommands.py	Mon Aug 03 22:40:05 2020 -0700
+++ b/mercurial/hgweb/webcommands.py	Sat Aug 22 16:03:44 2020 -0700
@@ -36,7 +36,6 @@
     revsetlang,
     scmutil,
     smartset,
-    templater,
     templateutil,
 )
 
@@ -1318,12 +1317,7 @@
     # a repo owner may set web.static in .hg/hgrc to get any file
     # readable by the user running the CGI script
     static = web.config(b"web", b"static", untrusted=False)
-    if not static:
-        tp = web.templatepath or templater.templatedir()
-        if tp is not None:
-            static = os.path.join(tp, b'static')
-
-    staticfile(static, fname, web.res)
+    staticfile(web.templatepath, static, fname, web.res)
     return web.res.sendresponse()