From 28ff4d984c0b802ab4fb09ff5ea6d77a315dfbcf Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Thu, 23 Jun 2005 17:23:48 +0000 Subject: [PATCH] =?UTF-8?q?=20=20Art=C4=B1k=20zip=20dosyalar=C4=B1m=C4=B1z?= =?UTF-8?q?=20a=C3=A7=C4=B1l=C4=B1rken=20dosya/dizin=20permissionlar=C4=B1?= =?UTF-8?q?=20do=C4=9Fru=20set=20ediliyor..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/archive.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pisi/archive.py b/pisi/archive.py index 361d2576..6e9a11b4 100644 --- a/pisi/archive.py +++ b/pisi/archive.py @@ -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)