Skip to content

Commit e7a0e61

Browse files
authored
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)
1 parent 969f589 commit e7a0e61

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/rp2_common/pico_lwip/tools/makefsdata.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ def process_file(input_dir, file):
2323
if content_type is None:
2424
content_type = "application/octet-stream"
2525

26-
# file name
27-
data = f"/{file.relative_to(input_dir)}\x00"
28-
comment = f"\"/{file.relative_to(input_dir)}\" ({len(data)} chars)"
26+
# file name with posix directory separators
27+
file_path_posix = file.relative_to(input_dir).as_posix()
28+
data = f"/{file_path_posix}\x00"
29+
comment = f"\"/{file_path_posix}\" ({len(data)} chars)"
2930
while(len(data) % PAYLOAD_ALIGNMENT != 0):
3031
data += "\x00"
3132
results.append({'data': bytes(data, "utf-8"), 'comment': comment});

0 commit comments

Comments
 (0)