mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[models] Skip over unknown data in manifest
This commit is contained in:
parent
d8cd885542
commit
22b9c5c932
|
@ -526,8 +526,12 @@ class FML:
|
||||||
for fm in _fml.elements:
|
for fm in _fml.elements:
|
||||||
fm.file_size = sum(c.size for c in fm.chunk_parts)
|
fm.file_size = sum(c.size for c in fm.chunk_parts)
|
||||||
|
|
||||||
if bio.tell() - fml_start != _fml.size:
|
if (size_read := bio.tell() - fml_start) != _fml.size:
|
||||||
raise ValueError('Did not read entire chunk data list!')
|
logger.warning(f'Did not read entire file data list! Version: {_fml.version}, '
|
||||||
|
f'{_fml.size - size_read} bytes missing, skipping...')
|
||||||
|
bio.seek(_fml.size - size_read, 1)
|
||||||
|
# downgrade version to prevent issues during serialisation
|
||||||
|
_fml.version = 1
|
||||||
|
|
||||||
return _fml
|
return _fml
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue