Kaydet (Commit) 1d1a0b27 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Merge branch 'patch-41837' into 'master'

GZ type inary files

See merge request sulinos/devel/inary!12
......@@ -733,6 +733,10 @@ class ArchiveZip(ArchiveBase):
if is_dir: # this is a directory
if not os.path.isdir(ofile):
os.makedirs(ofile)
perm = info.external_attr >> 16
if perm == 0:
perm = 33261 # octets of -rwxr-xr-x
os.chmod(ofile, perm)
continue
# check that output dir is present
......@@ -751,8 +755,12 @@ class ArchiveZip(ArchiveBase):
target = self.zip_obj.read(info.filename)
os.symlink(target, ofile)
else:
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)
def unpack_files(self, paths, target_dir):
self.unpack_file_cond(lambda f: f in paths, target_dir)
......