Skip to content

Commit 109edd8

Browse files
committed
fix windows
1 parent 8744d85 commit 109edd8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/io/common.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,8 +1326,10 @@ 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.netloc:
1330-
return Path(f"{parsed.netloc}{parsed.path}")
1329+
if is_platform_windows():
1330+
if parsed.netloc:
1331+
return Path(f"//{parsed.netloc}{unquote(parsed.path)}")
1332+
return Path(unquote(parsed.path.lstrip("/")))
13311333
return Path(unquote(parsed.path))
13321334

13331335

0 commit comments

Comments
 (0)