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

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

Fix duplicate super_empty.img

When calling add_img_to_target_files twice, super_empty.img will be
written twice, and resulting zip would contain duplicate entries.

Test: th
Bug: 278522974
Change-Id: I2419d0c4f8b04f876a8cc69a1517f59cab94d75d
parent 629bc8dc
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -818,6 +818,9 @@ def AddSuperEmpty(output_zip):
  """Create a super_empty.img and store it in output_zip."""

  img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "super_empty.img")
  if os.path.exists(img.name):
    logger.info("super_empty.img already exists; no need to rebuild...")
    return
  build_super_image.BuildSuperImage(OPTIONS.info_dict, img.name)
  img.Write()