Skip to content

Commit ca5975f

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents b765dee + 7ebfc8f commit ca5975f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

builder/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def copy_micropy_updates(port):
5353

5454
if port in ('raspberry_pi', 'macOS'):
5555
port = 'unix'
56+
src_path = f'micropy_updates/{port}'
5657

5758
dst_path = f'lib/micropython/ports/{port}'
5859

@@ -68,7 +69,8 @@ def iter_files(s_path, d_path, o_path):
6869

6970
iter_files(src_file, dst_file, org_file)
7071
else:
71-
shutil.copyfile(dst_file, org_file)
72+
if os.path.isfile(dst_file): # backup file if it exits
73+
shutil.copyfile(dst_file, org_file)
7274
shutil.copyfile(src_file, dst_file)
7375

7476
iter_files(src_path, dst_path, org_path)

0 commit comments

Comments
 (0)