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/archive.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/archive.py') diff --git a/lib/archive.py b/lib/archive.py index 21bc5c5..6e3efc0 100644 --- a/lib/archive.py +++ b/lib/archive.py @@ -59,9 +59,11 @@ class ZipStripper(GenericArchiveStripper): cfile = mat.create_class_file(name, False, self.add2archive) except: + #best solution I have found logging.error('%s is not supported' % item.filename) - #Returning false is the best solution imho - return False + _, ext = os.path.splitext(name) + if ext not in parser.NOMETA: + return False mat.secure_remove(name) zipin.close() return False -- cgit v1.3