diff --git a/src/util/urlutils.py b/src/util/urlutils.py index cf39604..0809ecc 100644 --- a/src/util/urlutils.py +++ b/src/util/urlutils.py @@ -11,9 +11,12 @@ def urls_to_path(urls: str) -> [str]: result.append(path) return result + def url_to_path(url: str) -> str: p = urlparse(url) if sys.platform == 'win32' or sys.platform == 'cygwin': + if p.netloc: + return f"//{p.netloc}{p.path}" return os.path.abspath(p.path[1:]) return os.path.abspath(os.path.join(p.netloc, p.path))