Hack: make the congress profile working

Change-Id: I121a4a1a0c2279b7a44417a1f805b29dff1adc8e
This commit is contained in:
Alexander Couzens
2025-12-15 22:34:36 +01:00
parent 125449126d
commit 51d91896ff
2 changed files with 13 additions and 3 deletions

View File

@@ -386,11 +386,21 @@ class File:
stream = io.BytesIO()
# Providing file content within "fillFileContent" / "fillFileOffset" shall have the same effect as
# creating a file with a fill/repeat pattern and thereafter updating the content via Update.
# Step 0: determine file size
file_size = self._file_size
for k, v in l:
if k != 'fileDescriptor':
continue
file_desc = v
if 'efFileSize' in file_desc:
file_size = self._decode_file_size(file_desc['efFileSize'])
# Step 1: Fill with pattern from Fcp or Template
if self.fill_pattern:
stream.write(self.expand_fill_pattern())
elif self.template and self.template.default_val:
stream.write(self.template.expand_default_value_pattern(self.file_size))
stream.write(self.template.expand_default_value_pattern(file_size))
stream.seek(0)
# then process the fillFileContent/fillFileOffset
for k, v in l: