Skip to content

Commit d7cf3d4

Browse files
gucong3000sindresorhus
authored andcommitted
Support Windows for resolve path (#80)
1 parent f27adc6 commit d7cf3d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = (pattern, options) => {
2323
// If the path leaves the current working directory, then we need to
2424
// resolve the absolute path so that the path can be properly matched
2525
// by minimatch (via multimatch)
26-
if (relPath.indexOf('../') === 0) {
26+
if (/^\.\.[\\/]/.test(relPath)) {
2727
relPath = path.resolve(relPath);
2828
}
2929

0 commit comments

Comments
 (0)