aboutsummaryrefslogtreecommitdiff
path: root/node_modules/glob-parent/index.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-03 01:33:53 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-03 01:33:53 +0100
commitd1291f67551c58168af43698a359cb5ddfd266b0 (patch)
tree55a13ed29fe1915e3f42f1b1b7038dafa2e975a7 /node_modules/glob-parent/index.js
parentd0a0695fb5d34996850723f7d4b1b59c3df909c2 (diff)
node_modules
Diffstat (limited to 'node_modules/glob-parent/index.js')
-rw-r--r--node_modules/glob-parent/index.js5
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');
};