diff options
| -rw-r--r-- | libmat/archive.py | 8 | ||||
| -rw-r--r-- | test/clean é.docx | bin | 2300 -> 2300 bytes | |||
| -rw-r--r-- | test/clean é.odt | bin | 10907 -> 10907 bytes | |||
| -rw-r--r-- | test/clean é.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 @@ | |||
| 1 | """ Take care of archives formats | 1 | """ Take care of archives formats |
| 2 | """ | 2 | """ |
| 3 | 3 | ||
| 4 | import datetime | ||
| 5 | import logging | 4 | import logging |
| 6 | import os | 5 | import os |
| 7 | import shutil | 6 | import shutil |
| @@ -14,7 +13,7 @@ import mat | |||
| 14 | import parser | 13 | import parser |
| 15 | 14 | ||
| 16 | # Zip files do not support dates older than 01/01/1980 | 15 | # Zip files do not support dates older than 01/01/1980 |
| 17 | ZIP_EPOCH = (1980, 1, 1, 1, 0, 0) | 16 | ZIP_EPOCH = (1980, 1, 1, 0, 0, 0) |
| 18 | 17 | ||
| 19 | 18 | ||
| 20 | class GenericArchiveStripper(parser.GenericParser): | 19 | class GenericArchiveStripper(parser.GenericParser): |
| @@ -38,6 +37,11 @@ class GenericArchiveStripper(parser.GenericParser): | |||
| 38 | mat.secure_remove(path_file) | 37 | mat.secure_remove(path_file) |
| 39 | shutil.rmtree(self.tempdir) | 38 | shutil.rmtree(self.tempdir) |
| 40 | 39 | ||
| 40 | def _should_remove(self, key): | ||
| 41 | """ This method is not used, but since it's defined in | ||
| 42 | parser.GenericParser, we must implement it.""" | ||
| 43 | pass | ||
| 44 | |||
| 41 | def is_clean(self, list_unsupported=False): | 45 | def is_clean(self, list_unsupported=False): |
| 42 | """ Virtual method to check for harmul metadata | 46 | """ Virtual method to check for harmul metadata |
| 43 | """ | 47 | """ |
diff --git a/test/clean é.docx b/test/clean é.docx index 727084e..9f450fc 100644 --- a/test/clean é.docx +++ b/test/clean é.docx | |||
| Binary files differ | |||
diff --git a/test/clean é.odt b/test/clean é.odt index 94032e8..1a54b92 100644 --- a/test/clean é.odt +++ b/test/clean é.odt | |||
| Binary files differ | |||
diff --git a/test/clean é.zip b/test/clean é.zip index c28f424..22b9f78 100644 --- a/test/clean é.zip +++ b/test/clean é.zip | |||
| Binary files differ | |||
