Extract file to targetdir

This commit is contained in:
Bahadır Kandemir
2009-02-06 09:31:38 +00:00
parent 9023d65abd
commit 8ca4359f82
+10 -1
View File
@@ -31,9 +31,18 @@ Index: pisi/archive.py
+ self.decompressToFileNew(name, outname)
+
+ def decompressToFileNew(self, name, outname):
+ self.extract(name, os.path.dirname(outname))
+ self.extract(name, outname)
+
+ def decompressToFileOld(self, name, outname):
import zlib
import binascii
@@ -414,7 +426,7 @@
perm &= 0x08FF0000
perm >>= 16
perm |= 0x00000100
- zip_obj.decompressToFile(info.filename, ofile)
+ zip_obj.decompressToFile(info.filename, target_dir)
os.chmod(ofile, perm)
def unpack_files(self, paths, target_dir):