From 4244be95923d3d1b452f2b698c5b7377fcb9d82b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=AD=90=EF=B8=8FNINIKA=E2=AD=90=EF=B8=8F?= Date: Tue, 20 May 2025 14:45:59 +0300 Subject: [PATCH] Fix handling of unicode filenames in usb_install_pc.py (#143) --- tools/usb_install_pc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/usb_install_pc.py b/tools/usb_install_pc.py index 86ae800..a4bb8d9 100644 --- a/tools/usb_install_pc.py +++ b/tools/usb_install_pc.py @@ -101,8 +101,9 @@ def send_nsp_list(nsp_dir, out_ep): # Add all files with the extension .nsp in the provided dir for nsp_path in [f for f in nsp_dir.iterdir() if f.is_file() and (f.suffix in EXTS)]: - nsp_path_list.append(nsp_path.__str__() + '\n') - nsp_path_list_len += len(nsp_path.__str__()) + 1 + nsp_path = bytes(nsp_path.__str__(), 'utf8') + b'\n' + nsp_path_list.append(nsp_path) + nsp_path_list_len += len(nsp_path) print('Sending header...')