comparison mercurial/hgweb/hgwebdir_mod.py @ 45327:9a5c4875a88c

hgweb: simplify staticfile() now that we always pass it a single directory I didn't realize this further simplifications enabled by D8786 until now. Differential Revision: https://phab.mercurial-scm.org/D8874
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 03 Aug 2020 22:15:45 -0700
parents d5ccc059fbcd
children d12fba074cc6
comparison
equal deleted inserted replaced
45326:e2320bb7a99f 45327:9a5c4875a88c
414 fname = req.qsparams[b'static'] 414 fname = req.qsparams[b'static']
415 static = self.ui.config(b"web", b"static", untrusted=False) 415 static = self.ui.config(b"web", b"static", untrusted=False)
416 if not static: 416 if not static:
417 tp = self.templatepath or templater.templatedir() 417 tp = self.templatepath or templater.templatedir()
418 if tp is not None: 418 if tp is not None:
419 static = [os.path.join(tp, b'static')] 419 static = os.path.join(tp, b'static')
420 420
421 staticfile(static, fname, res) 421 staticfile(static, fname, res)
422 return res.sendresponse() 422 return res.sendresponse()
423 423
424 # top-level index 424 # top-level index