equal
deleted
inserted
replaced
1319 # a repo owner may set web.static in .hg/hgrc to get any file |
1319 # a repo owner may set web.static in .hg/hgrc to get any file |
1320 # readable by the user running the CGI script |
1320 # readable by the user running the CGI script |
1321 static = web.config(b"web", b"static", untrusted=False) |
1321 static = web.config(b"web", b"static", untrusted=False) |
1322 if not static: |
1322 if not static: |
1323 tp = web.templatepath or templater.templatepaths() |
1323 tp = web.templatepath or templater.templatepaths() |
1324 if isinstance(tp, str): |
1324 if isinstance(tp, bytes): |
1325 tp = [tp] |
1325 tp = [tp] |
1326 static = [os.path.join(p, b'static') for p in tp] |
1326 static = [os.path.join(p, b'static') for p in tp] |
1327 |
1327 |
1328 staticfile(static, fname, web.res) |
1328 staticfile(static, fname, web.res) |
1329 return web.res.sendresponse() |
1329 return web.res.sendresponse() |