Unverified Kaydet (Commit) dda9f780 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Fixed permission error.

üst 17929fed
......@@ -733,10 +733,9 @@ class ArchiveZip(ArchiveBase):
if is_dir: # this is a directory
if not os.path.isdir(ofile):
os.makedirs(ofile)
perm = info.external_attr
perm &= 0xFFFF0000
perm >>= 16
perm |= 0x00000100
perm = info.external_attr >> 16
if perm == 0:
perm = 33261 # octets of -rwxr-xr-x
os.chmod(ofile, perm)
continue
......@@ -756,11 +755,9 @@ class ArchiveZip(ArchiveBase):
target = self.zip_obj.read(info.filename)
os.symlink(target, ofile)
else:
perm = info.external_attr
perm &= 0x08FF0000
perm >>= 16
perm |= 0x00000100
perm = info.external_attr >> 16
if perm==0:
perm=33261 # -rwxr-xr-x
info.filename = outpath
self.zip_obj.extract(info, target_dir)
os.chmod(ofile, perm)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment