diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2016-04-15 13:32:36 +0200 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-04-20 09:45:57 -0700 |
commit | 75487f0db80e70a3e27fabfe323a33258dfbbea8 (patch) | |
tree | a95e928d3296616320be15d4d1738b1c5bec8505 /test/fixtures/module-require | |
parent | 8636af10129e822d8ae928ef3470a4dff9c4192a (diff) | |
download | android-node-v8-75487f0db80e70a3e27fabfe323a33258dfbbea8.tar.gz android-node-v8-75487f0db80e70a3e27fabfe323a33258dfbbea8.tar.bz2 android-node-v8-75487f0db80e70a3e27fabfe323a33258dfbbea8.zip |
module: fix resolution of filename with trailing slash
A recent optimization of module loading performance [1] forgot to check that
extensions were set in a certain code path.
[1] https://github.com/nodejs/node/pull/5172/commits/ae18bbef48d87d9c641df85369f62cfd5ed8c250
Fixes: https://github.com/nodejs/node/issues/6214
PR-URL: https://github.com/nodejs/node/pull/6215
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Diffstat (limited to 'test/fixtures/module-require')
-rw-r--r-- | test/fixtures/module-require/not-found/node_modules/module1/package.json | 3 | ||||
-rw-r--r-- | test/fixtures/module-require/not-found/trailingSlash.js | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/test/fixtures/module-require/not-found/node_modules/module1/package.json b/test/fixtures/module-require/not-found/node_modules/module1/package.json new file mode 100644 index 0000000000..b5018d73b2 --- /dev/null +++ b/test/fixtures/module-require/not-found/node_modules/module1/package.json @@ -0,0 +1,3 @@ +{ + "main": "doesnotexist" +} diff --git a/test/fixtures/module-require/not-found/trailingSlash.js b/test/fixtures/module-require/not-found/trailingSlash.js new file mode 100644 index 0000000000..4ac6cba9ca --- /dev/null +++ b/test/fixtures/module-require/not-found/trailingSlash.js @@ -0,0 +1 @@ +require('module1/'); |