custominstall: fix cdn content install

This commit is contained in:
Ian Burgwin
2021-02-24 15:19:48 -08:00
parent 7a68b23365
commit 4ca2c59b5a

View File

@@ -467,6 +467,7 @@ class CustomInstall:
content_out_path = join(temp_content_root, content_filename) content_out_path = join(temp_content_root, content_filename)
self.log(f'Writing {content_enc_path}...') self.log(f'Writing {content_enc_path}...')
with cia.open_raw_section(co.cindex) as s, open(content_out_path, 'wb') as o: with cia.open_raw_section(co.cindex) as s, open(content_out_path, 'wb') as o:
s.seek(0) # a fix that is hopefully temporary and not permanent
result_hash = self.copy_with_progress(s, o, co.size, content_enc_path) result_hash = self.copy_with_progress(s, o, co.size, content_enc_path)
if result_hash != co.hash: if result_hash != co.hash:
self.log(f'WARNING: Hash does not match for {content_enc_path}!') self.log(f'WARNING: Hash does not match for {content_enc_path}!')