Skip to content

Commit

Permalink
handle [issue SLaks#3](SLaks#3) - "FolderName\" fails with empty stri…
Browse files Browse the repository at this point in the history
…ng. This should get swallowed like "."
  • Loading branch information
deerwood-mccord-jr committed Apr 30, 2018
1 parent 5a5bd62 commit f469bdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Minimatch/Minimatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ bool MatchOne(IList<string> file, IList<ParseItem> 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)
Expand Down

0 comments on commit f469bdc

Please sign in to comment.