Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
realpath files during module load
Browse files Browse the repository at this point in the history
  • Loading branch information
mishoo authored and ry committed Jan 7, 2011
1 parent 2e76cd3 commit 0853730
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
try {
var stats = fs.statSync(requestPath);
if (stats && !stats.isDirectory()) {
return requestPath;
return fs.realpathSync(requestPath);
}
} catch (e) {}
return false;
Expand Down Expand Up @@ -281,6 +281,7 @@
if (!filename) {
throw new Error("Cannot find module '" + request + "'");
}
id = filename;
return [id, filename];
}

Expand Down

0 comments on commit 0853730

Please sign in to comment.