diff options
| -rw-r--r-- | libmat2/archive.py | 2 | ||||
| -rw-r--r-- | libmat2/audio.py | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/libmat2/archive.py b/libmat2/archive.py index 5978846..13f9188 100644 --- a/libmat2/archive.py +++ b/libmat2/archive.py | |||
| @@ -161,6 +161,7 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser): | |||
| 161 | 161 | ||
| 162 | member_parser, _ = parser_factory.get_parser(full_path) # type: ignore | 162 | member_parser, _ = parser_factory.get_parser(full_path) # type: ignore |
| 163 | if member_parser: | 163 | if member_parser: |
| 164 | member_parser.sandbox = self.sandbox | ||
| 164 | local_meta = {**local_meta, **member_parser.get_meta()} | 165 | local_meta = {**local_meta, **member_parser.get_meta()} |
| 165 | 166 | ||
| 166 | if local_meta: | 167 | if local_meta: |
| @@ -248,6 +249,7 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser): | |||
| 248 | abort = True | 249 | abort = True |
| 249 | continue | 250 | continue |
| 250 | else: | 251 | else: |
| 252 | member_parser.sandbox = self.sandbox | ||
| 251 | if member_parser.remove_all() is False: | 253 | if member_parser.remove_all() is False: |
| 252 | logging.warning("In file %s, something went wrong \ | 254 | logging.warning("In file %s, something went wrong \ |
| 253 | with the cleaning of %s \ | 255 | with the cleaning of %s \ |
diff --git a/libmat2/audio.py b/libmat2/audio.py index 13ed291..4e447c5 100644 --- a/libmat2/audio.py +++ b/libmat2/audio.py | |||
| @@ -82,6 +82,7 @@ class FLACParser(MutagenParser): | |||
| 82 | with open(fname, 'wb') as f: | 82 | with open(fname, 'wb') as f: |
| 83 | f.write(picture.data) | 83 | f.write(picture.data) |
| 84 | p, _ = parser_factory.get_parser(fname) # type: ignore | 84 | p, _ = parser_factory.get_parser(fname) # type: ignore |
| 85 | p.sandbox = self.sandbox | ||
| 85 | # Mypy chokes on ternaries :/ | 86 | # Mypy chokes on ternaries :/ |
| 86 | meta[name] = p.get_meta() if p else 'harmful data' # type: ignore | 87 | meta[name] = p.get_meta() if p else 'harmful data' # type: ignore |
| 87 | os.remove(fname) | 88 | os.remove(fname) |
