mirror of
https://github.com/jprichardson/node-fs-extra.git
synced 2026-01-25 16:42:57 +00:00
lib/_copy: if setImmediate is not available, fallback to process.nextTick (Node v0.8)
This commit is contained in:
parent
757863933b
commit
61bbb4f668
@ -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…
x
Reference in New Issue
Block a user