Skip to content

Commit

Permalink
sq
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Feb 28, 2024
1 parent 1fc22bd commit 9157e36
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/resolve_robotics_uri_py/resolve_robotics_uri_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9157e36

Please sign in to comment.