This commit is contained in:
Kovid Goyal 2007-07-10 17:39:32 +00:00
parent 42d5697a79
commit ceb2c36f66

View File

@ -41,7 +41,7 @@ def extract(filename, dir):
prefix = dirname prefix = dirname
# extract files # extract files
for fn in filelist: for fn in filelist:
if not os.path.exists(os.path.dirname(fn)): if os.path.dirname(fn) and not os.path.exists(os.path.dirname(fn)):
os.makedirs(os.path.dirname(fn)) os.makedirs(os.path.dirname(fn))
out = open( fn, 'wb' ) out = open( fn, 'wb' )
buffer = StringIO( zf.read( fn )) buffer = StringIO( zf.read( fn ))