diff options
author | isaacs <i@izs.me> | 2012-06-26 15:20:26 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-06-26 15:20:26 -0700 |
commit | 21aa0df8b2f4fb8715943c4b0bdc944554be43e8 (patch) | |
tree | d6ce8d9477f189972856693661add6d3a8edae67 /lib/fs.js | |
parent | 1e50282ae8672ea2b6ea320e74389160bec951f0 (diff) | |
download | nodejs-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.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) { |