Skip to content

Commit

Permalink
Update url.py
Browse files Browse the repository at this point in the history
Adjust path.lstrip("\\") to path[1:] to fit WSL path that starts with "\\wsl.local"
  • Loading branch information
95833 authored Dec 7, 2024
1 parent 8b7afad commit e6cb20e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/core/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def parse_uri(uri: str) -> tuple[str, str]:
path = url2pathname(parsed.path)
if os.name == 'nt':
netloc = url2pathname(parsed.netloc)
path = path.lstrip("\\")
path = path[1:]
path = re.sub(r"^/([a-zA-Z]:)", r"\1", path) # remove slash preceding drive letter
path = re.sub(r"^([a-z]):", _uppercase_driveletter, path)
if netloc:
Expand Down

0 comments on commit e6cb20e

Please sign in to comment.