-
Notifications
You must be signed in to change notification settings - Fork 40
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
dangling symlinks cause crash #22
Comments
I've updated
|
bors bot
added a commit
to rehandalal/therapist
that referenced
this issue
Oct 9, 2018
35: Update pathspec to 0.5.9 r=rehandalal a=pyup-bot This PR updates [pathspec](https://pypi.org/project/pathspec) from **0.5.7** to **0.5.9**. <details> <summary>Changelog</summary> ### 0.5.9 ``` ------------------ - Fixed file system error handling. ``` ### 0.5.8 ``` ------------------ - Improved type checking. - Created scripts to test Python 2.6 because Tox removed support for it. - Improved byte string handling in Python 3. - `Issue 22`_: Handle dangling symlinks. .. _`Issue 22`: cpburnz/python-pathspec#22 ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/pathspec - Changelog: https://pyup.io/changelogs/pathspec/ - Repo: https://github.com/cpburnz/python-path-specification </details> Co-authored-by: pyup-bot <github-bot@pyup.io>
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using
PathSpec.match_tree
, If there is a broken symlink encountered, we get unhandled exception. It's here:https://github.com/cpburnz/python-path-specification/blob/da86e2c4d557df2d0a7cc9743268a7173d3a4828/pathspec/util.py#L68
I think you could fix it with
os.lstat
instead, but that's backwards incompat change.Perhaps
iter_tree
could have an option to not follow symlinks? You could follow the example ofos.walk
, which accepts afollowlinks
keyword arg, and also anonerror
callback which can be used to handle problems such as permission errors when stat each file.The text was updated successfully, but these errors were encountered: