Skip to content
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

Investigate our use of ** with Dotnet.Glob #201

Open
Tracked by #1135
JamieMagee opened this issue Aug 16, 2022 · 2 comments · May be fixed by #1141
Open
Tracked by #1135

Investigate our use of ** with Dotnet.Glob #201

JamieMagee opened this issue Aug 16, 2022 · 2 comments · May be fixed by #1141
Labels
breaking change Breaking change, requires major version bump status:ready Ready to start implementation type:bug Bug fix of existing functionality

Comments

@JamieMagee
Copy link
Member

I believe we are incorrectly using the ** pattern. We rolled back in #200, but would like to upgrade still.

Sources:

@cobya cobya added the type:bug Bug fix of existing functionality label Aug 16, 2022
@JamieMagee JamieMagee added the status:ready Ready to start implementation label Aug 26, 2022
@JamieMagee
Copy link
Member Author

The issue is here:

foreach (var directoryExclusion in directoryExclusionList)
{
minimatchers.Add(directoryExclusion, Glob.Parse(allowWindowsPaths ? directoryExclusion : /* [] escapes special chars */ directoryExclusion.Replace("\\", "[\\]"), globOptions));
}

If we pass **/samples/** it throws IndexOutOfRangeException

Glob.Parse("**/samples/**").IsMatch("d:\\df\\samples") is a minimal example.

@melotic melotic added the breaking change Breaking change, requires major version bump label Jun 26, 2023
@cobya
Copy link
Contributor

cobya commented May 15, 2024

Ideally most of these issues will be resolved after the changes from #1091 are merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Breaking change, requires major version bump status:ready Ready to start implementation type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants