X Tutup
Skip to content

[3.13] GH-118289: Fix handling of non-directories in posixpath.realpath() (GH-120127)#126815

Merged
barneygale merged 1 commit intopython:3.13from
barneygale:backport-fd4b545-3.13
Nov 13, 2024
Merged

[3.13] GH-118289: Fix handling of non-directories in posixpath.realpath() (GH-120127)#126815
barneygale merged 1 commit intopython:3.13from
barneygale:backport-fd4b545-3.13

Conversation

@barneygale
Copy link
Contributor

@barneygale barneygale commented Nov 13, 2024

In strict mode, raise NotADirectoryError if we encounter a non-directory while we still have path parts left to process.

We use a part_count variable rather than len(rest) because the rest stack also contains markers for unresolved symlinks.. (cherry picked from commit fd4b545)

….realpath()` (pythonGH-120127)

In strict mode, raise `NotADirectoryError` if we encounter a non-directory
while we still have path parts left to process.

We use a `part_count` variable rather than `len(rest)` because the `rest`
stack also contains markers for unresolved symlinks..
(cherry picked from commit fd4b545)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

X Tutup