From 91b726514ed0ec309051c1401747bc9217108837 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Fri, 21 Jul 2023 15:34:19 -0700 Subject: [PATCH] embedSdf.py: use posix paths (#1297) Signed-off-by: Steve Peters --- sdf/embedSdf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdf/embedSdf.py b/sdf/embedSdf.py index c4bc0a1ab..3f07d9392 100644 --- a/sdf/embedSdf.py +++ b/sdf/embedSdf.py @@ -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 @@ -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)