Artık zip dosyalarımız açılırken dosya/dizin permissionları doğru set ediliyor..

This commit is contained in:
A. Murat Eren
2005-06-23 17:23:48 +00:00
parent 11510e2fbb
commit 28ff4d984c
+6
View File
@@ -103,10 +103,16 @@ class ArchiveZip(ArchiveBase):
target = zip.read(fileName)
os.symlink(target, ofile)
else:
inf = zip.getinfo(fileName)
perm = inf.external_attr
perm &= 0x00FF0000;
perm >>= 16;
perm |= 0x00000100;
buff = open (ofile, 'wb')
fileContent = zip.read(fileName)
buff.write(fileContent)
buff.close()
os.chmod(ofile, perm)
def unpack_files(self, paths, targetDir):
self.unpack_file_cond(lambda f:f in paths, targetDir)