Do not set permission to 0 for extracted file.

This commit is contained in:
Matthieu Gautier 2023-11-28 17:16:22 +01:00
parent ca3d90d793
commit 93a8c89996
1 changed files with 2 additions and 1 deletions

View File

@ -297,7 +297,8 @@ def extract_archive(archive_path, dest_dir, topdir=None, name=None):
if isdir(member):
continue
perm = (member.external_attr >> 16) & 0x1FF
os.chmod(pj(tmpdir, getname(member)), perm)
if perm:
os.chmod(pj(tmpdir, getname(member)), perm)
name = name or topdir
shutil.copytree(
pj(tmpdir, topdir),