zip açma sorunu (dosyalar yerine dizin oluşturuluyordu) çözüldü.
Fakat sembolik linklerde halen sorun var.
This commit is contained in:
+8
-1
@@ -49,13 +49,20 @@ class ArchiveZip(ArchiveBase):
|
|||||||
fileNames = zip.namelist()
|
fileNames = zip.namelist()
|
||||||
for file in fileNames:
|
for file in fileNames:
|
||||||
ofile = self.targetDir + '/' + file
|
ofile = self.targetDir + '/' + file
|
||||||
if not os.path.exists(ofile):
|
|
||||||
|
# a directory is present. lets continue
|
||||||
|
if os.path.isdir(ofile):
|
||||||
|
continue
|
||||||
|
# do we need to create parent directory for our file?
|
||||||
|
if not os.path.exists(os.path.dirname(ofile)):
|
||||||
os.mkdir(ofile)
|
os.mkdir(ofile)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
buff = open (ofile, 'wb')
|
buff = open (ofile, 'wb')
|
||||||
fileContent = zip.read(file)
|
fileContent = zip.read(file)
|
||||||
buff.write(fileContent)
|
buff.write(fileContent)
|
||||||
buff.close()
|
buff.close()
|
||||||
|
|
||||||
zip.close()
|
zip.close()
|
||||||
|
|
||||||
class Archive:
|
class Archive:
|
||||||
|
|||||||
Reference in New Issue
Block a user