Closed as not planned
Description
Bug report
Bug description:
>>> import posixpath
>>> posixpath.commonpath(["//foo/bar", "//foo/baz"])
'/foo'
Expected: //foo
with precisely two leading slashes, see: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13
This can be quite easily solved using posixpath.splitroot
, see the PR.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS