10000 GH-89769: Pathlib - do not follow links when checking for precise glob match by akulakov · Pull Request #29655 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-89769: Pathlib - do not follow links when checking for precise glob match #29655

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

Merged
merged 15 commits into from
May 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix typo in var name
  • Loading branch information
akulakov committed Nov 20, 2021
commit 686cd34c42eedce170870950f3c690f195546cf3
4 changes: 2 additions & 2 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
_WINERROR_CANT_RESOLVE_FILENAME = 1921 # broken symlink pointing to itself

# EBADF - guard against macOS `stat` throwing EBADF
_IGNORED_ERROS = (ENOENT, ENOTDIR, EBADF, ELOOP)
_IGNORED_ERRORS = (ENOENT, ENOTDIR, EBADF, ELOOP)

_IGNORED_WINERRORS = (
_WINERROR_NOT_READY,
_WINERROR_INVALID_NAME,
_WINERROR_CANT_RESOLVE_FILENAME)

def _ignore_error(exception):
return (getattr(exception, 'errno', None) in _IGNORED_ERROS or
return (getattr(exception, 'errno', None) in _IGNORED_ERRORS or
getattr(exception, 'winerror', None) in _IGNORED_WINERRORS)


Expand Down
0