diff --git a/index.js b/index.js index 9e4742b..cb03219 100644 --- a/index.js +++ b/index.js @@ -4,6 +4,6 @@ var path = require('path'); var isglob = require('is-glob'); module.exports = function globParent(str) { - while (isglob(path.basename(str))) str = path.dirname(str); + while (isglob(str)) str = path.dirname(str); return str; };