Commit 36777d2a authored by Robert Kowalski's avatar Robert Kowalski Committed by Ben Noordhuis
Browse files

module: test for directories, fix require with ..

Given my home-directory is `/Users/rocko` - and I have a file named
`npm.json` in it and also a repository with name `npm`, which is a
folder for the node-module.

When try to require the `/Users/rocko/npm/index.js` two direcotry
levels down in the npm folder (e.g. `/Users/rocko/npm/test/tap`)
with require("../../") node will load `/Users/rocko/npm/index.json`.

When I use require("../..") node will load `/Users/rocko/npm.json`
which is fixed by this commit.

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


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-by: default avatarChris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: default avatarRod Vagg <rod@vagg.org>
parent 3ac49419
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