diff --git a/pio/gzip-firmware.py b/pio/gzip-firmware.py index 43af1f933..248bb5a02 100644 --- a/pio/gzip-firmware.py +++ b/pio/gzip-firmware.py @@ -6,7 +6,7 @@ import gzip OUTPUT_DIR = "build_output{}".format(os.path.sep) def bin_gzip(source, target, env): - variant = str(target[0]).split(os.path.sep)[1] + variant = str(target[0]).split(os.path.sep)[2] # create string with location and file names based on variant bin_file = "{}firmware{}{}.bin".format(OUTPUT_DIR, os.path.sep, variant) diff --git a/pio/name-firmware.py b/pio/name-firmware.py index 1490ecc5c..1c79056de 100644 --- a/pio/name-firmware.py +++ b/pio/name-firmware.py @@ -5,7 +5,7 @@ import shutil OUTPUT_DIR = "build_output{}".format(os.path.sep) def bin_map_copy(source, target, env): - variant = str(target[0]).split(os.path.sep)[1] + variant = str(target[0]).split(os.path.sep)[2] # check if output directories exist and create if necessary if not os.path.isdir(OUTPUT_DIR):