mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
icon fix
This commit is contained in:
parent
0fcb015f9a
commit
7b54a63396
|
@ -1208,12 +1208,15 @@ class HttpCli(object):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def tx_ico(self, ext, exact=False):
|
def tx_ico(self, ext, exact=False):
|
||||||
if not exact:
|
|
||||||
if ext.endswith("/"):
|
if ext.endswith("/"):
|
||||||
ext = "a.folder"
|
ext = "folder"
|
||||||
|
exact = True
|
||||||
|
|
||||||
|
bad = re.compile(r"[](){}/[]|^[0-9_-]*$")
|
||||||
|
n = ext.split(".")[::-1]
|
||||||
|
if not exact:
|
||||||
|
n = n[:-1]
|
||||||
|
|
||||||
bad = re.compile(r"[](){}[]|^[0-9_-]*$")
|
|
||||||
n = ext.split(".")[1:][::-1]
|
|
||||||
ext = ""
|
ext = ""
|
||||||
for v in n:
|
for v in n:
|
||||||
if len(v) > 7 or bad.search(v):
|
if len(v) > 7 or bad.search(v):
|
||||||
|
|
Loading…
Reference in a new issue