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

"C:\THIS_IS_A_DIR\**\somefile.txt" matches wrongly to "C:\THIS_IS_A_DIR\awesomefile.txt" #27

Closed
thomas-patzig opened this issue May 31, 2017 · 4 comments
Labels

Comments

@thomas-patzig
Copy link

see the test "DotNet.Glob.Tests.GlobTests.Does_Not_Match"
should not match but does it

[Theory]
[InlineData( "C:\\THIS_IS_A_DIR\\**\\somefile.txt", "C:\\THIS_IS_A_DIR\\awesomefile.txt" )]
public void Does_Not_Match(string pattern, params string[] testStrings)
{
    var glob = Globbing.Glob.Parse(pattern);
    foreach (var testString in testStrings)
    {
        Assert.False(glob.IsMatch(testString));
    }
}

@dazinator
Copy link
Owner

Ah yes, thank you for finding this bug with the behavior of **. I'll get it fixed and leave those tests in as regression tests for the future.

@dazinator dazinator added the bug label May 31, 2017
dazinator added a commit that referenced this issue Jun 6, 2017
Hotfix for ** matching bug issue #27
@dazinator
Copy link
Owner

dazinator commented Jun 6, 2017

This has now been fixed in the latest stable release, nuget package version 1.6.1.

@czjlorenz
Copy link

thank you very much for the quick fix

@dazinator
Copy link
Owner

You are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants