Closed thomas-patzig closed 7 years ago
Ouch.. nasty! It seems I introduced this as a result of my last fix! I'll add a test case and fix this as soon as I can! Thanks
Hmm I can't replicate this. I've added a test case using the pattern and test string you have supplied above but it passes. Could you provide a repro?
I am closing this as I can't repro.
I created new console application and installed 1.6.6.
I then did this:
class Program
{
static void Main(string[] args)
{
string localPattern = @"C:\sources\COMPILE*\MSVC120.DLL";
string localInput = @"C:\sources\COMPILE\ANTLR3.RUNTIME.DLL";
bool isMAtch = DotNet.Globbing.Glob.Parse(localPattern).IsMatch(localInput);
Console.WriteLine("IsMatch: " + isMAtch);
}
}
The output was:
try this code:
var x = Glob.Parse( @"C:\sources\x-y 1\BIN\DEBUG\COMPILE\**\MSVC*120.DLL" ); x.IsMatch( @"C:\sources\x-y 1\BIN\DEBUG\COMPILE\ANTLR3.RUNTIME.DLL" );
I think it's the blank space in path "x-y 1"
Hi dazinator,
do you reopen this issue or should I create a new one?
Have reopened. I will investigate with the new test case you have provided, hopefully will catch the problem this time, thank you.
Good news - I have replicated this using your last example - thank you. I will release an updated patch version to nuget.org momentarily.
Fixed as of 1.6.9: https://www.nuget.org/packages/DotNet.Glob/1.6.9
it works thanks
No problem. Thank you for reporting.
try this code: localPattern="C:\sources\COMPILE*\MSVC120.DLL" localInput="C:\sources\COMPILE\ANTLR3.RUNTIME.DLL"
var glob = Glob.Parse( localPattern ); return glob.IsMatch( localInput );
endless loop in "WildcardDirectoryTokenEvaluator.IsMatch":
currentPosition=51 maxPos=51 isMatch=false
` // Match until maxpos, is reached. while (currentPosition <= maxPos) { // Test at current position. isMatch = _subEvaluator.IsMatch(allChars, currentPosition, out newPosition); if (isMatch) { return isMatch; }
`