We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c756492 commit 5e269adCopy full SHA for 5e269ad
pandas/io/common.py
@@ -1326,8 +1326,16 @@ def _match_file(
1326
1327
def _resolve_local_path(path_str: str) -> Path:
1328
parsed = parse_url(path_str)
1329
- if is_platform_windows() and parsed.scheme != "file":
1330
- return Path(unquote(path_str.lstrip("/\\")))
+
+ 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
1339
return Path(unquote(parsed.path))
1340
1341
0 commit comments