From 0853730c35e567b1cd2e553986298e57f3908f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mihai=20C=C4=83lin=20Bazon?= Date: Tue, 4 Jan 2011 12:24:17 -0800 Subject: [PATCH] realpath files during module load --- src/node.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node.js b/src/node.js index 44ca862647..39b835da7c 100644 --- a/src/node.js +++ b/src/node.js @@ -173,7 +173,7 @@ try { var stats = fs.statSync(requestPath); if (stats && !stats.isDirectory()) { - return requestPath; + return fs.realpathSync(requestPath); } } catch (e) {} return false; @@ -281,6 +281,7 @@ if (!filename) { throw new Error("Cannot find module '" + request + "'"); } + id = filename; return [id, filename]; }