Fix map name when using loopback devices

This commit is contained in:
2Shirt 2020-01-04 18:28:43 -07:00
parent 168c0a50df
commit b79deefdd6
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -120,7 +120,9 @@ class BlockPair():
# Set map file
# e.g. '(Clone|Image)_Model[_p#]_Size[_Label].map'
map_name = model
map_name = model if model else 'None'
if source.details['bus'] == 'Image':
map_name = 'Image'
if source.details['parent']:
part_num = re.sub(r"^.*?(\d+)$", r"\1", source.path.name)
map_name += f'_p{part_num}'