From 13c05f347fb3f4c9b1fcbbaf791f7cfae2219443 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 19 Aug 2015 13:23:43 +0200 Subject: Revert the ZIP_EPOCH date to 1980-01-01 00:00:00 This was a typo from my side, spotted by intrigeri. --- libmat/archive.py | 8 ++++++-- "test/clean \303\251.docx" | Bin 2300 -> 2300 bytes "test/clean \303\251.odt" | Bin 10907 -> 10907 bytes "test/clean \303\251.zip" | Bin 5747 -> 5747 bytes 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libmat/archive.py b/libmat/archive.py index 7a71717..8a3fee9 100644 --- a/libmat/archive.py +++ b/libmat/archive.py @@ -1,7 +1,6 @@ """ Take care of archives formats """ -import datetime import logging import os import shutil @@ -14,7 +13,7 @@ import mat import parser # Zip files do not support dates older than 01/01/1980 -ZIP_EPOCH = (1980, 1, 1, 1, 0, 0) +ZIP_EPOCH = (1980, 1, 1, 0, 0, 0) class GenericArchiveStripper(parser.GenericParser): @@ -38,6 +37,11 @@ class GenericArchiveStripper(parser.GenericParser): mat.secure_remove(path_file) shutil.rmtree(self.tempdir) + def _should_remove(self, key): + """ This method is not used, but since it's defined in + parser.GenericParser, we must implement it.""" + pass + def is_clean(self, list_unsupported=False): """ Virtual method to check for harmul metadata """ diff --git "a/test/clean \303\251.docx" "b/test/clean \303\251.docx" index 727084e..9f450fc 100644 Binary files "a/test/clean \303\251.docx" and "b/test/clean \303\251.docx" differ diff --git "a/test/clean \303\251.odt" "b/test/clean \303\251.odt" index 94032e8..1a54b92 100644 Binary files "a/test/clean \303\251.odt" and "b/test/clean \303\251.odt" differ diff --git "a/test/clean \303\251.zip" "b/test/clean \303\251.zip" index c28f424..22b9f78 100644 Binary files "a/test/clean \303\251.zip" and "b/test/clean \303\251.zip" differ -- cgit v1.3