Commit 7384ca83 authored by Chris Yip's avatar Chris Yip Committed by Roman Reiss
Browse files

module: remove '' from Module.globalPaths

If `$NODE_PATH` contains trailing separators, `Module.globalPaths` will
contains empty strings. When `Module` try to resolve a module's path,
`path.resolve('', 'index.js')` will boil down to `$PWD/index.js`, which
makes sub modules can access global modules and get unexpected result.

PR-URL: https://github.com/iojs/io.js/pull/1488


Reviewed-By: default avatarRoman Reiss <me@silverwind.io>
parent a7d74633
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment