Artık zip dosyalarımız açılırken dosya/dizin permissionları doğru set ediliyor..
This commit is contained in:
@@ -103,10 +103,16 @@ class ArchiveZip(ArchiveBase):
|
|||||||
target = zip.read(fileName)
|
target = zip.read(fileName)
|
||||||
os.symlink(target, ofile)
|
os.symlink(target, ofile)
|
||||||
else:
|
else:
|
||||||
|
inf = zip.getinfo(fileName)
|
||||||
|
perm = inf.external_attr
|
||||||
|
perm &= 0x00FF0000;
|
||||||
|
perm >>= 16;
|
||||||
|
perm |= 0x00000100;
|
||||||
buff = open (ofile, 'wb')
|
buff = open (ofile, 'wb')
|
||||||
fileContent = zip.read(fileName)
|
fileContent = zip.read(fileName)
|
||||||
buff.write(fileContent)
|
buff.write(fileContent)
|
||||||
buff.close()
|
buff.close()
|
||||||
|
os.chmod(ofile, perm)
|
||||||
|
|
||||||
def unpack_files(self, paths, targetDir):
|
def unpack_files(self, paths, targetDir):
|
||||||
self.unpack_file_cond(lambda f:f in paths, targetDir)
|
self.unpack_file_cond(lambda f:f in paths, targetDir)
|
||||||
|
|||||||
Reference in New Issue
Block a user