Browse files

glob matching: 'foo' should match 'foo/'

This is the cause of substack/node-bigint#9
  • Loading branch information...
1 parent 176f12e commit 5f1c33b4eec44f8ff174581e7261f8512f46f8a1 @isaacs isaacs committed Apr 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/utils/minimatch.js
View
2 lib/utils/minimatch.js
@@ -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]))
}

0 comments on commit 5f1c33b

Please sign in to comment.