zipfile bug fixed, unittests are so great..

"who do u want me to kill now, you teletabiez!", aragorn.
This commit is contained in:
A. Murat Eren
2005-06-14 11:43:07 +00:00
parent 98843d8a15
commit 963c24c464
+4 -4
View File
@@ -34,11 +34,11 @@ class ArchiveZip(ArchiveBase):
zip = zipfile.ZipFile(config.archives_dir() + '/' + self.fileName, 'r')
fileNames = zip.namelist()
for file in fileNames:
file = config.archives_dir() + '/' + file
if not os.path.exists(os.path.dirname(file)):
os.mkdir(os.path.dirname(file))
ofile = config.archives_dir() + '/' + file
if not os.path.exists(os.path.dirname(config.archives_dir() + '/' + file)):
os.mkdir(os.path.dirname(config.archives_dir() + '/' + file))
continue
buff = open (file, 'wb')
buff = open (ofile, 'wb')
fileContent = zip.read(file)
buff.write(fileContent)
buff.close()