Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
glob matching: 'foo' should match 'foo/'
Browse files Browse the repository at this point in the history
This is the cause of substack/node-bigint#9
  • Loading branch information
isaacs committed Apr 13, 2011
1 parent 176f12e commit 5f1c33b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/minimatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function minimatch (p, pattern) {
// path, or just the basename.
return !!p.match(re[pattern])
|| ( p.substr(-1) === "/"
&& !!p.substr(0, -1).match(re[pattern]) )
&& !!p.slice(0, -1).match(re[pattern]) )
|| (pattern.indexOf("/") === -1 && path.basename(p).match(re[pattern]))
}

Expand Down

0 comments on commit 5f1c33b

Please sign in to comment.