Skip to content

Commit a566f5c

Browse files
committed
Fix windows handling
1 parent 64dce3a commit a566f5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pystac/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ def safe_urlparse(href: str) -> URLParseResult:
7777
if parsed.scheme == "file" and os.name == "nt":
7878
if parsed.netloc:
7979
path = f"{parsed.netloc}{parsed.path}"
80-
elif parsed.path.startswith("/"):
80+
elif parsed.path.startswith("/") and ":" in parsed.path:
8181
path = parsed.path[1:]
82+
else:
83+
path = parsed.path
8284

8385
return URLParseResult(
8486
scheme=parsed.scheme,

0 commit comments

Comments
 (0)