Browse Source

lib/_copy: if setImmediate is not available, fallback to process.nextTick (Node v0.8)

ci/travis-osximage
JP Richardson 10 years ago
parent
commit
61bbb4f668
  1. 3
      lib/_copy.js

3
lib/_copy.js

@ -49,9 +49,10 @@ function ncp (source, dest, options, callback) {
}
function getStats(source) {
var defer = global.setImmediate || process.nextTick
var stat = dereference ? fs.stat : fs.lstat
if (running >= limit) {
return setImmediate(function () {
return defer(function () {
getStats(source)
})
}

Loading…
Cancel
Save