diff options
Diffstat (limited to 'deps/npm/node_modules/path-is-inside/lib/path-is-inside.js')
-rw-r--r-- | deps/npm/node_modules/path-is-inside/lib/path-is-inside.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/npm/node_modules/path-is-inside/lib/path-is-inside.js b/deps/npm/node_modules/path-is-inside/lib/path-is-inside.js index 5d1160e57..596dfd3b3 100644 --- a/deps/npm/node_modules/path-is-inside/lib/path-is-inside.js +++ b/deps/npm/node_modules/path-is-inside/lib/path-is-inside.js @@ -13,7 +13,11 @@ module.exports = function (thePath, potentialParent) { potentialParent = potentialParent.toLowerCase(); } - return thePath.indexOf(potentialParent) === 0; + return thePath.lastIndexOf(potentialParent, 0) === 0 && + ( + thePath[potentialParent.length] === path.sep || + thePath[potentialParent.length] === undefined + ); }; function stripTrailingSep(thePath) { |