test icin.. hemen kizmayin :)
bir de henuz symlink problemimiz var, cozulecek..
This commit is contained in:
+8
-2
@@ -61,8 +61,14 @@ class ArchiveZip(ArchiveBase):
|
|||||||
def close(self):
|
def close(self):
|
||||||
self.zip.close()
|
self.zip.close()
|
||||||
|
|
||||||
def add_file(self, zipPath, filePath):
|
def add_file(self, workDir, file):
|
||||||
self.zip.write(filePath, filePath, zipfile.ZIP_DEFLATED)
|
realPath = workDir + '/' + file
|
||||||
|
if os.path.isdir(realPath):
|
||||||
|
self.zip.writestr(file + '/', '')
|
||||||
|
for f in os.listdir(realPath):
|
||||||
|
self.add_file(workDir, file + '/' + f)
|
||||||
|
else:
|
||||||
|
self.zip.write(realPath, file, zipfile.ZIP_DEFLATED)
|
||||||
|
|
||||||
def unpack_file_cond(self, pred, targetDir, archiveRoot=''):
|
def unpack_file_cond(self, pred, targetDir, archiveRoot=''):
|
||||||
""" unpack file according to predicate function filename -> bool"""
|
""" unpack file according to predicate function filename -> bool"""
|
||||||
|
|||||||
Reference in New Issue
Block a user