summaryrefslogtreecommitdiff
path: root/lib/fs.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-06-26 15:20:26 -0700
committerisaacs <i@izs.me>2012-06-26 15:20:26 -0700
commit21aa0df8b2f4fb8715943c4b0bdc944554be43e8 (patch)
treed6ce8d9477f189972856693661add6d3a8edae67 /lib/fs.js
parent1e50282ae8672ea2b6ea320e74389160bec951f0 (diff)
downloadnodejs-21aa0df8b2f4fb8715943c4b0bdc944554be43e8.tar.gz
nodejs-21aa0df8b2f4fb8715943c4b0bdc944554be43e8.tar.bz2
nodejs-21aa0df8b2f4fb8715943c4b0bdc944554be43e8.zip
realpath: No sync cb() calling allowed.
Diffstat (limited to 'lib/fs.js')
-rw-r--r--lib/fs.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/fs.js b/lib/fs.js
index 8bfc10cdd..076ddb50c 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -1070,7 +1070,7 @@ fs.realpath = function realpath(p, cache, cb) {
p = pathModule.resolve(p);
if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
- return cb(null, cache[p]);
+ return process.nextTick(cb.bind(null, null, cache[p]));
}
var original = p,
@@ -1088,7 +1088,7 @@ fs.realpath = function realpath(p, cache, cb) {
// walk down the path, swapping out linked pathparts for their real
// values
- LOOP();
+ return process.nextTick(LOOP);
function LOOP() {
// stop if scanned past end of path
if (pos >= p.length) {