bpo-33660: Fix corner-case in PosixPath.resolve resulting in `"//path"` by mbarkhau · Pull Request #21971 · python/cpython
Navigation Menu
- Notifications You must be signed in to change notification settings
- Fork 34.4k
Conversation
On posix, when `Path.cwd() == "/"`, the `Path("var").resolve()`
produced `"//var"`. This is because the sep usually needs to be
added together with a prefix/base to a relative path, as the
prefix/base does not usually end with the sep itself. In this
respect, the root directory is a corner-case that was previously
missed.
mbarkhau
changed the title
Fix corner-case in PosixPath.resolve resulting in
bpo-33660: Fix corner-case in PosixPath.resolve resulting in "//path""//path"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters