From e7a0e61165e52da35d70e028c2c0543afaed0127 Mon Sep 17 00:00:00 2001 From: Jean Jonethal Date: Tue, 7 Jan 2025 18:05:13 +0100 Subject: [PATCH] convert windows path delimiter to posix (#2149) (#2150) * convert windows path delimiter to posix (#2149) * add explicite variable assignment for intermediate resource name conversion result (#2149) --- src/rp2_common/pico_lwip/tools/makefsdata.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rp2_common/pico_lwip/tools/makefsdata.py b/src/rp2_common/pico_lwip/tools/makefsdata.py index 88fca43a6..61312b5b8 100755 --- a/src/rp2_common/pico_lwip/tools/makefsdata.py +++ b/src/rp2_common/pico_lwip/tools/makefsdata.py @@ -23,9 +23,10 @@ def process_file(input_dir, file): if content_type is None: content_type = "application/octet-stream" - # file name - data = f"/{file.relative_to(input_dir)}\x00" - comment = f"\"/{file.relative_to(input_dir)}\" ({len(data)} chars)" + # file name with posix directory separators + file_path_posix = file.relative_to(input_dir).as_posix() + data = f"/{file_path_posix}\x00" + comment = f"\"/{file_path_posix}\" ({len(data)} chars)" while(len(data) % PAYLOAD_ALIGNMENT != 0): data += "\x00" results.append({'data': bytes(data, "utf-8"), 'comment': comment});