bpo-33660: Fix corner-case in PosixPath.resolve resulting in `"//path"` by mbarkhau · Pull Request #21971 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

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 mbarkhau changed the title Fix corner-case in PosixPath.resolve resulting in "//path" bpo-33660: Fix corner-case in PosixPath.resolve resulting in "//path"

Aug 26, 2020

Labels