Skip to content

Commit

Permalink
embedSdf.py: use posix paths (#1297)
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Jul 21, 2023
1 parent cfe1f20 commit 91b7265
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sdf/embedSdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import argparse
import inspect
import sys
from pathlib import Path
from pathlib import Path, PurePosixPath


# The list of supported SDF specification versions. This will let us drop
Expand Down Expand Up @@ -164,7 +164,9 @@ def generate_map_content(paths: List[Path], relative_to: Optional[str] = None) -
# Strip relative path if requested
if relative_to is not None:
path = path.relative_to(relative_to)
content.append(embed_sdf_content(str(path), file_content))
# dir separator is hardcoded to '/' in C++ mapping
posix_path = PurePosixPath(path)
content.append(embed_sdf_content(str(posix_path), file_content))
return ",".join(content)


Expand Down

0 comments on commit 91b7265

Please sign in to comment.