ws-arch2: codecs/compress/Lzh (lh1 / lh4-lh7 / lhx / lzs / lz5 / ARJ 4; ported from lhasa, ISC) + archive/lha (levels 0-3, extended headers, symlinks, DOS-name case, read; level-2 lh0 write); bench lines

This commit is contained in:
4DBug committed 2026-10-31 14:40:25 -05:00
1 parent 94d79313d4
commit 572cd42f8a
10 files changed
+1303

No files matched your search

+10
View File
@@ -61,3 +61,13 @@ def read_tree(root):
def tmpdir():
return tempfile.mkdtemp(prefix="arch2-")
def rmtree(root):
"""shutil.rmtree that first makes extracted directories writable (archives store read-only modes)"""
for d, ds, _ in os.walk(root):
for x in ds:
p = os.path.join(d, x)
if not os.path.islink(p):
os.chmod(p, 0o755)
shutil.rmtree(root, ignore_errors=True)