diff --git a/Minimatch/Minimatcher.cs b/Minimatch/Minimatcher.cs index 450a0e9..3807211 100644 --- a/Minimatch/Minimatcher.cs +++ b/Minimatch/Minimatcher.cs @@ -960,7 +960,7 @@ bool MatchOne(IList file, IList pattern, bool partial) // can't swallow "." or ".." ever. // can only swallow ".foo" when explicitly asked. if (swallowee == "." || swallowee == ".." || - (!options.Dot && swallowee[0] == '.')) + (!options.Dot && !string.IsNullOrEmpty(swallowee) && swallowee[0] == '.')) { //if (options.debug) // console.error("dot detected!", file, fr, pattern, pr)