Support DOS file attributes (e.g. archive-bit or hidden-bit) (#4705)
This fixes #4554
This commit is contained in:
parent
bc7b093089
commit
5995097e61
1 changed files with 7 additions and 2 deletions
|
@ -339,7 +339,12 @@ class ZipArchive(object):
|
||||||
if len(pcs[0]) != 7 and len(pcs[0]) != 10: continue
|
if len(pcs[0]) != 7 and len(pcs[0]) != 10: continue
|
||||||
if len(pcs[6]) != 15: continue
|
if len(pcs[6]) != 15: continue
|
||||||
|
|
||||||
if pcs[0][0] not in 'dl-?' or not frozenset(pcs[0][1:]).issubset('rwxst-'):
|
# Possible entries:
|
||||||
|
# -rw-rws--- 1.9 unx 2802 t- defX 11-Aug-91 13:48 perms.2660
|
||||||
|
# -rw-a-- 1.0 hpf 5358 Tl i4:3 4-Dec-91 11:33 longfilename.hpfs
|
||||||
|
# -r--ahs 1.1 fat 4096 b- i4:2 14-Jul-91 12:58 EA DATA. SF
|
||||||
|
# --w------- 1.0 mac 17357 bx i8:2 4-May-92 04:02 unzip.macr
|
||||||
|
if pcs[0][0] not in 'dl-?' or not frozenset(pcs[0][1:]).issubset('rwxstah-'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
ztype = pcs[0][0]
|
ztype = pcs[0][0]
|
||||||
|
|
Loading…
Reference in a new issue