diff options
| author | jvoisin | 2018-10-01 22:26:35 +0200 |
|---|---|---|
| committer | jvoisin | 2018-10-02 11:55:42 -0700 |
| commit | c67bbafb2c60782096af4f6225d94e18225d2ecf (patch) | |
| tree | 0cef3d44437aa436be0446d2231f53b3776735bf /libmat2/archive.py | |
| parent | 5b606f939d7fb49830ab765585ca997bd44cfd76 (diff) | |
Use [Content_Types].xml to improve MS Office coverage
Diffstat (limited to 'libmat2/archive.py')
| -rw-r--r-- | libmat2/archive.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmat2/archive.py b/libmat2/archive.py index d812531..b29d690 100644 --- a/libmat2/archive.py +++ b/libmat2/archive.py | |||
| @@ -17,7 +17,7 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser): | |||
| 17 | """ Office files (.docx, .odt, …) are zipped files. """ | 17 | """ Office files (.docx, .odt, …) are zipped files. """ |
| 18 | # Those are the files that have a format that _isn't_ | 18 | # Those are the files that have a format that _isn't_ |
| 19 | # supported by MAT2, but that we want to keep anyway. | 19 | # supported by MAT2, but that we want to keep anyway. |
| 20 | files_to_keep = set() # type: Set[str] | 20 | files_to_keep = set() # type: Set[Pattern] |
| 21 | 21 | ||
| 22 | # Those are the files that we _do not_ want to keep, | 22 | # Those are the files that we _do not_ want to keep, |
| 23 | # no matter if they are supported or not. | 23 | # no matter if they are supported or not. |
| @@ -89,7 +89,7 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser): | |||
| 89 | abort = True | 89 | abort = True |
| 90 | continue | 90 | continue |
| 91 | 91 | ||
| 92 | if item.filename in self.files_to_keep: | 92 | if any(map(lambda r: r.search(item.filename), self.files_to_keep)): |
| 93 | # those files aren't supported, but we want to add them anyway | 93 | # those files aren't supported, but we want to add them anyway |
| 94 | pass | 94 | pass |
| 95 | elif any(map(lambda r: r.search(item.filename), self.files_to_omit)): | 95 | elif any(map(lambda r: r.search(item.filename), self.files_to_omit)): |
