diff --git a/legendary/models/json_manifest.py b/legendary/models/json_manifest.py index 1cfd292..b86b3dd 100644 --- a/legendary/models/json_manifest.py +++ b/legendary/models/json_manifest.py @@ -136,7 +136,9 @@ class JSONFML(FML): _fm = FileManifest() _fm.filename = _fmj.pop('Filename', '') _fm.hash = blob_to_num(_fmj.pop('FileHash')).to_bytes(160//8, 'little') - _fm.flags = int(_fmj.pop('bIsUnixExecutable', False)) << 2 + _fm.flags |= int(_fmj.pop('bIsReadOnly', False)) + _fm.flags |= int(_fmj.pop('bIsCompressed', False)) << 1 + _fm.flags |= int(_fmj.pop('bIsUnixExecutable', False)) << 2 _fm.file_size = 0 _fm.chunk_parts = [] _fm.install_tags = _fmj.pop('InstallTags', list()) diff --git a/legendary/models/manifest.py b/legendary/models/manifest.py index 9892785..87c404f 100644 --- a/legendary/models/manifest.py +++ b/legendary/models/manifest.py @@ -397,6 +397,14 @@ class FileManifest: self.chunk_parts = [] self.file_size = 0 + @property + def read_only(self): + return self.flags & 0x1 + + @property + def compressed(self): + return self.flags & 0x2 + @property def executable(self): return self.flags & 0x4