Skip to content

[3.15] gh-102475: Fix os.path.realpath() for names which look like a drive (GH-155399) - #156593

Open
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-0c38e05-3.15
Open

[3.15] gh-102475: Fix os.path.realpath() for names which look like a drive (GH-155399)#156593
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-0c38e05-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

The unresolved part of the path was joined with the resolved part using
join(), so a component containing a colon (e.g. "spam:eggs") reset the path.
It is now simply appended.

A path relative to a drive which does not exist (e.g. "Z:spam") is now
resolved against the root directory of that drive, as the Windows path
normalization does.
(cherry picked from commit 0c38e05)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

…rive (pythonGH-155399)

The unresolved part of the path was joined with the resolved part using
join(), so a component containing a colon (e.g. "spam:eggs") reset the path.
It is now simply appended.

A path relative to a drive which does not exist (e.g. "Z:spam") is now
resolved against the root directory of that drive, as the Windows path
normalization does.
(cherry picked from commit 0c38e05)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants