Skip to content

Commit

Permalink
add explicite variable assignment for intermediate resource name conv…
Browse files Browse the repository at this point in the history
…ersion result (#2149)
  • Loading branch information
jjonethal committed Dec 28, 2024
1 parent 6aa1bfe commit 3a7f95d
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).as_posix()}\x00"
comment = f"\"/{file.relative_to(input_dir).as_posix()}\" ({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

1 comment on commit 3a7f95d

@jjonethal
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add variable for explicite posix path conversion result.

Please sign in to comment.