From 2fb48f128bf0312d910c22661b659c2a99753a2c Mon Sep 17 00:00:00 2001 From: Bi0T1N Date: Fri, 18 Mar 2022 17:56:29 +0100 Subject: [PATCH] Hardcode separator in generated C++ mapping to '/' it should not be operating system dependent because it is hardcoded to '/' in the C++ file that performs the lookup --- sdf/embedSdf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdf/embedSdf.py b/sdf/embedSdf.py index 6e5af2f22..ee88342a5 100644 --- a/sdf/embedSdf.py +++ b/sdf/embedSdf.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from pathlib import Path +from pathlib import Path, PurePosixPath """"Script for generating a C++ file that contains the content from all SDF files""" @@ -94,7 +94,9 @@ def get_map_content(arg_pathlist: Path) -> str: map_str = '' files = [] for path in pathlist: - files.append(str(path)) + # dir separator is hardcoded to '/' in C++ mapping + posix_path = PurePosixPath(path) + files.append(str(posix_path)) # get ascending order files.sort() for file in files: