zipfile bug fixed, unittests are so great..
"who do u want me to kill now, you teletabiez!", aragorn.
This commit is contained in:
+4
-4
@@ -34,11 +34,11 @@ class ArchiveZip(ArchiveBase):
|
|||||||
zip = zipfile.ZipFile(config.archives_dir() + '/' + self.fileName, 'r')
|
zip = zipfile.ZipFile(config.archives_dir() + '/' + self.fileName, 'r')
|
||||||
fileNames = zip.namelist()
|
fileNames = zip.namelist()
|
||||||
for file in fileNames:
|
for file in fileNames:
|
||||||
file = config.archives_dir() + '/' + file
|
ofile = config.archives_dir() + '/' + file
|
||||||
if not os.path.exists(os.path.dirname(file)):
|
if not os.path.exists(os.path.dirname(config.archives_dir() + '/' + file)):
|
||||||
os.mkdir(os.path.dirname(file))
|
os.mkdir(os.path.dirname(config.archives_dir() + '/' + file))
|
||||||
continue
|
continue
|
||||||
buff = open (file, 'wb')
|
buff = open (ofile, 'wb')
|
||||||
fileContent = zip.read(file)
|
fileContent = zip.read(file)
|
||||||
buff.write(fileContent)
|
buff.write(fileContent)
|
||||||
buff.close()
|
buff.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user