]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-78079: Fix UNC device path root normalization in pathlib (GH-102003)
authorBarney Gale <barney.gale@gmail.com>
Fri, 14 Apr 2023 20:55:41 +0000 (21:55 +0100)
committerGitHub <noreply@github.com>
Fri, 14 Apr 2023 20:55:41 +0000 (21:55 +0100)
commit8af8f52d175959f03cf4a2786b6a81ec09e15e95
tree8848581a801af299c17343a997acb5f1a06c9f40
parent7c1b0a46c61f8bf8e2039bba1bff11b6ae20e56b
GH-78079: Fix UNC device path root normalization in pathlib (GH-102003)

We no longer add a root to device paths such as `//./PhysicalDrive0`,
`//?/BootPartition` and `//./c:` while normalizing. We also avoid adding a
root to incomplete UNC share paths, like `//`, `//a` and `//a/`.

Co-authored-by: Eryk Sun <eryksun@gmail.com>
Lib/pathlib.py
Lib/test/test_ntpath.py
Lib/test/test_pathlib.py
Misc/NEWS.d/next/Library/2023-02-17-21-14-40.gh-issue-78079.z3Szr6.rst [new file with mode: 0644]