Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca45d7a8 authored by Kelvin Zhang's avatar Kelvin Zhang
Browse files

Fix incremental OTA generation failures

source_file might be a directory, use the _ReadApexInfo() helper
function to read it instead of go straight to zipfiles.

Test: build incremental OTA for pixel
Bug: 279142680
Bug: 227848550
Bug: 277028723

Change-Id: Ia0041e2c72c1a57123519c970f6e734194a81cd2
parent fad39259
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -642,8 +642,7 @@ def ConstructOtaApexInfo(target_zip, source_file=None):
  if not source_file:
    return target_apex_string

  with zipfile.ZipFile(source_file, "r", allowZip64=True) as source_zip:
    source_apex_string = _ReadApexInfo(source_zip)
  source_apex_string = _ReadApexInfo(source_file)
  if not source_apex_string:
    return target_apex_string