diff options
author | isaacs <i@izs.me> | 2014-03-19 09:25:40 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-03-19 09:26:05 -0700 |
commit | a65c1aaf3afe21a34cae7b4ad266a6f2723704d1 (patch) | |
tree | 61e4c2a3b069f78d8ef5ae635a887cda13ec1c15 /deps/npm/node_modules/path-is-inside/lib/path-is-inside.js | |
parent | 43a29f53ca11ab48e1d1ef6b2a0e673ae43a42a0 (diff) | |
download | node-npm-1.4.6.tar.gz |
npm: upgrade to 1.4.6npm-1.4.6
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) { |