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
This commit is contained in:
parent
629bc8dc1c
commit
aecdc18222
1 changed files with 3 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue