~/Projects/Tasmota
git clone https://code.lsong.org/Tasmota
Commit
- Commit
- 10821b7e2487f9f543c11ae15b9252525ebf7a2b
- Author
- Jason2866 <24528715+[email protected]>
- Date
- 2023-05-31 21:54:59 +0200 +0200
- Diffstat
pio-tools/name-firmware.py | 3 ++-
fix factory file not removed (#18761)
diff --git a/pio-tools/name-firmware.py b/pio-tools/name-firmware.py index 0d853d035c3c65c919f6bf4ad3659bdddf88e0a6..e2d38f6fd96acccc45b0d3b8f29a6b464358321b 100644 --- a/pio-tools/name-firmware.py +++ b/pio-tools/name-firmware.py @@ -13,6 +13,7 @@ # get locations and file names based on variant map_file = tasmotapiolib.get_final_map_path(env) bin_file = tasmotapiolib.get_final_bin_path(env) + one_bin_file = bin_file if env["PIOPLATFORM"] == "espressif32": factory_tmp = pathlib.Path(firsttarget).with_suffix("") @@ -21,7 +22,7 @@ one_bin_tmp = pathlib.Path(bin_file).with_suffix("") one_bin_file = one_bin_tmp.with_suffix(one_bin_tmp.suffix + ".factory.bin") # check if new target files exist and remove if necessary - for f in [map_file, bin_file]: + for f in [map_file, bin_file, one_bin_file]: if f.is_file(): f.unlink()