Search for partition maps in IMAGES dir as well

Partition images are allowed to be in either IMAGES/ or RADIO/ dir of a
target_files zip, so when searching for .map files we should look in
both dirs.

Test: th
Bug: 227848550
Change-Id: I0a9d2c582d8f5d570237434902fac012513c9aad
This commit is contained in:
Kelvin Zhang
2023-06-13 10:34:32 -07:00
parent 4b47e8a2f3
commit b789e84499

View File

@@ -760,6 +760,9 @@ def GetPartitionImages(target_files_dir: str, ab_partitions, allow_empty=True):
def LocatePartitionMap(target_files_dir: str, partition: str):
path = os.path.join(target_files_dir, "RADIO", partition + ".map")
if os.path.exists(path):
return path
path = os.path.join(target_files_dir, "IMAGES", partition + ".map")
if os.path.exists(path):
return path
return ""