-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-27827: pathlib: identify a greater range of reserved filename on Windows. #26698
bpo-27827: pathlib: identify a greater range of reserved filename on Windows. #26698
Conversation
`pathlib.PureWindowsPath.is_reserved()` now identifies as reserved filenames with trailing spaces or colons. Co-Authored-By: Eryk Sun <eryksun@gmail.com>
# path processing. Thus relative paths are not resolved and slash is not | ||
# translated to backslash. It has the native NT path limit of 32767 | ||
# characters, but a bit less after resolving device symbolic links, | ||
# such as '\??\C:' => '\Device\HarddiskVolume2'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do those in-memory symlinks really detract from the limit?
I.e. is a new full path really formed,
or just the remaining part is passed to the FS driver?
Thanks @barneygale for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9. |
…ythonGH-26698) `pathlib.PureWindowsPath.is_reserved()` now identifies as reserved filenames with trailing spaces or colons. Co-authored-by: Barney Gale <barney.gale@foundry.com> Co-authored-by: Eryk Sun <eryksun@gmail.com> (cherry picked from commit 56c1f6d) Co-authored-by: Barney Gale <barney.gale@gmail.com>
GH-27421 is a backport of this pull request to the 3.10 branch. |
GH-27422 is a backport of this pull request to the 3.9 branch. |
…ythonGH-26698) `pathlib.PureWindowsPath.is_reserved()` now identifies as reserved filenames with trailing spaces or colons. Co-authored-by: Barney Gale <barney.gale@foundry.com> Co-authored-by: Eryk Sun <eryksun@gmail.com> (cherry picked from commit 56c1f6d) Co-authored-by: Barney Gale <barney.gale@gmail.com>
pathlib.PureWindowsPath.is_reserved()
now identifies as reserved filenames with trailing spaces or colons.All credit to Eryk Sun for this patch.
https://bugs.python.org/issue27827