This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch aevri/win32_minimal_seemstowork_20190829 in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 97cf62334d40fad31e650422c28f7074e908f8e0 Author: Angelos Evripiotis <[email protected]> AuthorDate: Tue Jun 25 14:23:43 2019 +0100 element: platform independent _get_normal_name Note that windows has two path separators '/' and '\', handle both. --- src/buildstream/element.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 7061a27..7c70cfe 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -3196,7 +3196,10 @@ def _overlap_error_detail(f, forbidden_overlap_elements, elements): # (str): The normalised element name # def _get_normal_name(element_name): - return os.path.splitext(element_name.replace(os.sep, '-'))[0] + name_no_sep = element_name.replace(os.sep, '-') + if os.altsep is not None: + name_no_sep = name_no_sep.replace(os.altsep, '-') + return os.path.splitext(name_no_sep)[0] # _compose_artifact_name():
