Skip to content

Commit 5e269ad

Browse files
committed
debug win
1 parent c756492 commit 5e269ad

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pandas/io/common.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,8 +1326,16 @@ def _match_file(
13261326

13271327
def _resolve_local_path(path_str: str) -> Path:
13281328
parsed = parse_url(path_str)
1329-
if is_platform_windows() and parsed.scheme != "file":
1330-
return Path(unquote(path_str.lstrip("/\\")))
1329+
1330+
if is_platform_windows():
1331+
if parsed.scheme == "file":
1332+
if parsed.netloc:
1333+
return Path(f"//{parsed.netloc}{unquote(parsed.path)}")
1334+
return Path(unquote(parsed.path.lstrip("/")))
1335+
1336+
if re.match(r"^[a-zA-Z]:[\\/]", path_str):
1337+
return Path(unquote(path_str))
1338+
13311339
return Path(unquote(parsed.path))
13321340

13331341

0 commit comments

Comments
 (0)