Skip to content
Snippets Groups Projects
Commit e4f17956 authored by Matt Mackall's avatar Matt Mackall
Browse files

hgwebdir: honor web.templates and web.static for static files (issue3734)

parent 52581d2b
No related branches found
No related tags found
No related merge requests found
......@@ -184,7 +184,13 @@
fname = virtual[7:]
else:
fname = req.form['static'][0]
static = templater.templatepath('static')
static = self.ui.config("web", "static", None,
untrusted=False)
if not static:
tp = self.templatepath or templater.templatepath()
if isinstance(tp, str):
tp = [tp]
static = [os.path.join(p, 'static') for p in tp]
return (staticfile(static, fname, req),)
# top-level index
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment