From ea21231d6d332b5e27e85c0ce0c103cfb56433f8 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 25 Jul 2011 03:21:40 +0200 Subject: Correct handling of unknown fileformat into zipfile (and fixe many previous-commit-bugs) --- lib/office.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/office.py') diff --git a/lib/office.py b/lib/office.py index 2302dbc..9a5be3e 100644 --- a/lib/office.py +++ b/lib/office.py @@ -27,7 +27,7 @@ class OpenDocumentStripper(archive.GenericArchiveStripper): method here : http://bugs.python.org/issue6818 ''' zipin = zipfile.ZipFile(self.filename, 'r') - zipout = zipfile.ZipFile(self.basename + parser.POSTFIX + self.ext, 'w', + zipout = zipfile.ZipFile(self.output, 'w', allowZip64=True) for item in zipin.namelist(): name = os.path.join(self.tempdir, item) @@ -134,7 +134,7 @@ class PdfStripper(parser.Generic_parser): ''' def __init__(self, filename, realname, backup): name, path = os.path.splitext(filename) - self.output = name + '.cleaned.' + ext + self.output = name + '.cleaned' + ext self.filename = filename self.backup = backup self.realname = realname -- cgit v1.3