Skip to content

Commit 1f310d7

Browse files
committed
try to fix win
1 parent 109edd8 commit 1f310d7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandas/io/common.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,13 @@ def _resolve_local_path(path_str: str) -> Path:
13291329
if is_platform_windows():
13301330
if parsed.netloc:
13311331
return Path(f"//{parsed.netloc}{unquote(parsed.path)}")
1332-
return Path(unquote(parsed.path.lstrip("/")))
1332+
1333+
path = unquote(parsed.path)
1334+
if path.startswith("\\") and not path.startswith("\\\\"):
1335+
drive = os.path.splitdrive(os.getcwd())[0]
1336+
return Path(drive + path)
1337+
1338+
return Path(path)
13331339
return Path(unquote(parsed.path))
13341340

13351341

0 commit comments

Comments
 (0)