diff --git a/src/resolve_robotics_uri_py/resolve_robotics_uri_py.py b/src/resolve_robotics_uri_py/resolve_robotics_uri_py.py index 507e82b..e77a54d 100644 --- a/src/resolve_robotics_uri_py/resolve_robotics_uri_py.py +++ b/src/resolve_robotics_uri_py/resolve_robotics_uri_py.py @@ -90,8 +90,9 @@ def resolve_robotics_uri(uri: str) -> pathlib.Path: FileNotFoundError: If no file corresponding to the URI is found. """ - # If the URI has no scheme, use by default file:// - if ":/" not in uri: + # If the URI has no scheme, use by default file:// which maps the resolved input + # path to a URI with empty authority + if not any(uri.startswith(scheme) for scheme in SupportedSchemes): uri = f"file://{pathlib.Path(uri).resolve()}" # Get scheme from URI