diff options
Diffstat (limited to 'node_modules/glob-parent/index.js')
-rw-r--r-- | node_modules/glob-parent/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js index 61615f1ac..9a7e59375 100644 --- a/node_modules/glob-parent/index.js +++ b/node_modules/glob-parent/index.js @@ -2,9 +2,10 @@ var path = require('path'); var isglob = require('is-glob'); +var pathDirname = require('path-dirname'); module.exports = function globParent(str) { str += 'a'; // preserves full path in case of trailing path separator - do {str = path.dirname(str)} while (isglob(str)); - return str; + do {str = pathDirname.posix(str)} while (isglob(str)); + return str.replace(/\\([\*\?\|\[\]\(\)\{\}])/g, '$1'); }; |