Skip to content

Commit

Permalink
convert windows path delimiter to posix (#2149) (#2150)
Browse files Browse the repository at this point in the history
* convert windows path delimiter to posix (#2149)

* add explicite variable assignment for intermediate resource name conversion result (#2149)
  • Loading branch information
jjonethal authored Jan 7, 2025
1 parent 969f589 commit e7a0e61
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rp2_common/pico_lwip/tools/makefsdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down

0 comments on commit e7a0e61

Please sign in to comment.