mercurial/hgweb/webcommands.py
changeset 39793 536f22d6c2c5
parent 39784 be0f32ca2671
child 39794 4f44f747f094
equal deleted inserted replaced
39792:ff0060d2a099 39793:536f22d6c2c5
  1219 @webcommand('static')
  1219 @webcommand('static')
  1220 def static(web):
  1220 def static(web):
  1221     fname = web.req.qsparams['file']
  1221     fname = web.req.qsparams['file']
  1222     # a repo owner may set web.static in .hg/hgrc to get any file
  1222     # a repo owner may set web.static in .hg/hgrc to get any file
  1223     # readable by the user running the CGI script
  1223     # readable by the user running the CGI script
  1224     static = web.config("web", "static", None, untrusted=False)
  1224     static = web.config("web", "static", untrusted=False)
  1225     if not static:
  1225     if not static:
  1226         tp = web.templatepath or templater.templatepaths()
  1226         tp = web.templatepath or templater.templatepaths()
  1227         if isinstance(tp, str):
  1227         if isinstance(tp, str):
  1228             tp = [tp]
  1228             tp = [tp]
  1229         static = [os.path.join(p, 'static') for p in tp]
  1229         static = [os.path.join(p, 'static') for p in tp]