Browse Source

realpath files during module load

v0.7.4-release
Mihai Călin Bazon 14 years ago
committed by Ryan Dahl
parent
commit
0853730c35
  1. 3
      src/node.js

3
src/node.js

@ -173,7 +173,7 @@
try { try {
var stats = fs.statSync(requestPath); var stats = fs.statSync(requestPath);
if (stats && !stats.isDirectory()) { if (stats && !stats.isDirectory()) {
return requestPath; return fs.realpathSync(requestPath);
} }
} catch (e) {} } catch (e) {}
return false; return false;
@ -281,6 +281,7 @@
if (!filename) { if (!filename) {
throw new Error("Cannot find module '" + request + "'"); throw new Error("Cannot find module '" + request + "'");
} }
id = filename;
return [id, filename]; return [id, filename];
} }

Loading…
Cancel
Save