dazinator / DotNet.Glob

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

wrong match for "C:\name.ext" to glob pattern "C:\name\**" #29

Closed czjlorenz closed 7 years ago

czjlorenz commented 7 years ago

given the following test code ...

var glob = DotNet.Globbing.Glob.Parse( @"C:\name\**" ); bool result = glob.IsMatch( @"C:\name.ext" ); result = glob.IsMatch( @"C:\name_longer.ext");`

... the result of IsMatch() is true in both cases. To my mind this is wrong. The result should be false. I am using DotNet.Glob-1.6.1 from nuget.org.

dazinator commented 7 years ago

Thanks for finding this. I'll add test coverage for this case and get back to you!

dazinator commented 7 years ago

Verified.

dazinator commented 7 years ago

Hotfix pushed. Once appveyor builds and publishes (takes a few minutes) version 1.6.2 will appear on nuget - upgrade to that for the fix.

Thank you for reporting.

dazinator commented 7 years ago