From 963c24c464737aeee5a402d404f81822f94774ef Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Tue, 14 Jun 2005 11:43:07 +0000 Subject: [PATCH] zipfile bug fixed, unittests are so great.. "who do u want me to kill now, you teletabiez!", aragorn. --- src/pisi/archive.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pisi/archive.py b/src/pisi/archive.py index fe03b0ff..0dc71fba 100644 --- a/src/pisi/archive.py +++ b/src/pisi/archive.py @@ -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()