diff options
Diffstat (limited to 'libmat2/parser_factory.py')
| -rw-r--r-- | libmat2/parser_factory.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libmat2/parser_factory.py b/libmat2/parser_factory.py index e93ee4f..3931903 100644 --- a/libmat2/parser_factory.py +++ b/libmat2/parser_factory.py | |||
| @@ -50,6 +50,10 @@ def get_parser(filename: str) -> Tuple[Optional[T], Optional[str]]: | |||
| 50 | if extension.lower() in UNSUPPORTED_EXTENSIONS: | 50 | if extension.lower() in UNSUPPORTED_EXTENSIONS: |
| 51 | return None, mtype | 51 | return None, mtype |
| 52 | 52 | ||
| 53 | if mtype == 'application/x-tar': | ||
| 54 | if extension[1:] in ('bz2', 'gz', 'xz'): | ||
| 55 | mtype = mtype + '+' + extension[1:] | ||
| 56 | |||
| 53 | for parser_class in _get_parsers(): # type: ignore | 57 | for parser_class in _get_parsers(): # type: ignore |
| 54 | if mtype in parser_class.mimetypes: | 58 | if mtype in parser_class.mimetypes: |
| 55 | try: | 59 | try: |
