Do not set permission to 0 for extracted file.
This commit is contained in:
parent
ca3d90d793
commit
93a8c89996
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue