dazinator / DotNet.Glob

A fast globbing library for .NET / .NETStandard applications. Outperforms Regex.
MIT License
363 stars 27 forks source link

Glob.Match InvalidOperationException #39

Closed PazerOP closed 7 years ago

PazerOP commented 7 years ago

Calling Glob.Match() on certain globs/input strings will produce an InvalidOperationException with the message "Index was outside the bounds of the array". Repro for v1.6.9:

Glob.Parse("*://*wikia.com/**").Match("chrome://extensions");
dazinator commented 7 years ago

What version are you using?

PazerOP commented 7 years ago

Latest, 1.6.9.

dazinator commented 7 years ago

That's odd. Are you sure you are calling Match and not IsMatch() ? There used to be a Match method but I removed it recently: https://github.com/dazinator/DotNet.Glob/blob/develop/src/DotNet.Glob/Glob.cs#L40

dazinator commented 7 years ago

Ah I see. I removed it as of the latest pre-release (alpha) package. But it is there in the last stable release 1.6.9 as you have seen. Can you use IsMatch() instead?

dazinator commented 7 years ago

For background: https://github.com/dazinator/DotNet.Glob/issues/28

PazerOP commented 7 years ago

I see. Thank you.