-
Notifications
You must be signed in to change notification settings - Fork 656
Limit search pattern and directory recursion #4647
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
base: main
Are you sure you want to change the base?
Conversation
da62f4a
to
86ca875
Compare
86ca875
to
3693ec5
Compare
Narrow the scope of the search pattern to only include project files and limit directory recursion to 255 subdirectories to avoid infinite loops and subsequent `PathTooLongException`. May fix GitToolsGH-4411.
3693ec5
to
f37a27d
Compare
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.
Pull Request Overview
This PR enhances the project file discovery mechanism by limiting the scope and depth of directory traversal to prevent infinite loops and PathTooLongException
errors. The changes specifically target scenarios where directory recursion could become problematic.
- Introduces a maximum recursion depth limit of 255 subdirectories
- Narrows the search pattern from "*" to "*proj" to focus on actual project files
- Replaces the legacy
SearchOption.AllDirectories
with modernEnumerationOptions
|
Description
Narrow the scope of the search pattern to only include project files and limit directory recursion to 255 subdirectories to avoid infinite loops and subsequent
PathTooLongException
.Related Issue
May fix GH-4411.
Checklist: