dazinator / DotNet.Glob

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

Glob failing on matching `/` with Index was outside the bounds of the array #82

Closed xoofx closed 3 years ago

xoofx commented 3 years ago

Hey,

I have started to use this library and it's great, thank you!

I have discovered one small glitch. If you have the following code:

var glob = Glob.Parse("**/~*");
// throws System.IndexOutOfRangeException
glob.IsMatch("/");

The glob.IsMatch will throw a System.IndexOutOfRangeException

dazinator commented 3 years ago

Thanks for reporting- will take a look soon!

dazinator commented 3 years ago

@xoofx - This has been fixed (and a regression test added) in version 3.1.2, which should appear on nuget shortly (or also latest alpha). Many thanks for reporting this, and sorry about the bug.