Show More
@@ -191,12 +191,7 b' def staticfile(directory, fname, res):' | |||
|
191 | 191 | return |
|
192 | 192 | |
|
193 | 193 | fpath = os.path.join(*fname.split(b'/')) |
|
194 | if isinstance(directory, bytes): | |
|
195 | directory = [directory] | |
|
196 | for d in directory: | |
|
197 | path = os.path.join(d, fpath) | |
|
198 | if os.path.exists(path): | |
|
199 | break | |
|
194 | path = os.path.join(directory, fpath) | |
|
200 | 195 | try: |
|
201 | 196 | os.stat(path) |
|
202 | 197 | ct = pycompat.sysbytes( |
@@ -416,7 +416,7 b' class hgwebdir(object):' | |||
|
416 | 416 | if not static: |
|
417 | 417 | tp = self.templatepath or templater.templatedir() |
|
418 | 418 | if tp is not None: |
|
419 |
static = |
|
|
419 | static = os.path.join(tp, b'static') | |
|
420 | 420 | |
|
421 | 421 | staticfile(static, fname, res) |
|
422 | 422 | return res.sendresponse() |
@@ -1320,7 +1320,7 b' def static(web):' | |||
|
1320 | 1320 | static = web.config(b"web", b"static", untrusted=False) |
|
1321 | 1321 | if not static: |
|
1322 | 1322 | tp = web.templatepath or templater.templatedir() |
|
1323 |
static = |
|
|
1323 | static = os.path.join(tp, b'static') | |
|
1324 | 1324 | |
|
1325 | 1325 | staticfile(static, fname, web.res) |
|
1326 | 1326 | return web.res.sendresponse() |
General Comments 0
You need to be logged in to leave comments.
Login now