|
|
@ -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) { |
|
|
|