From 1d00fa317dde3dad6f802924d6cacdf35f25e611 Mon Sep 17 00:00:00 2001 From: Marko Durkovic Date: Mon, 5 Jul 2021 11:16:38 +0200 Subject: [PATCH] Fix msg parsing on non-POSIX platforms --- src/rosbags/typesys/msg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rosbags/typesys/msg.py b/src/rosbags/typesys/msg.py index 52943a43..7242d12a 100644 --- a/src/rosbags/typesys/msg.py +++ b/src/rosbags/typesys/msg.py @@ -12,7 +12,7 @@ Rosbag1 connection information. from __future__ import annotations -from pathlib import Path +from pathlib import PurePosixPath as Path from typing import TYPE_CHECKING from .base import Nodetype, parse_message_definition @@ -85,8 +85,8 @@ def normalize_msgtype(name: str) -> str: """ path = Path(name) if path.parent.name != 'msg': - return str(path.parent / 'msg' / path.name) - return name + path = path.parent / 'msg' / path.name + return str(path) def normalize_fieldtype(field: Any, names: List[str]):