Skip to content

Fix error message for ntpath.commonpath #117381

Description

@nineteendo

Bug report

Bug description:

>>>importntpath>>>ntpath.commonpath(["/foo", "foo"])
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"<frozen ntpath>", line808, incommonpathValueError: Can'tmixabsoluteandrelativepaths

/foo is not an absolute path, but a rooted path, which can't be mixed with not-rooted paths.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowstype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions