I encountered the following problem.
If you copy a directory containing a number of other directories ncp stops responding.
This bug works on ubuntu and does not work on os x.
I think this is due to the fact that adding a directory in turn "running" variable increases, but the function of CB may not be started, because "function cb(skipped)" running only with files.
On my computer at work, I rewrote this section so:
before
function getStats(source) {
var stat = dereference ? fs.stat : fs.lstat;
if (running >= limit) {
return defer(function () {
getStats(source);
});
}
running++;
stat(source, function (err, stats) {
var item = {};
if (err) {
return onError(err);
}
after
function getStats(source) {
var stat = dereference ? fs.stat : fs.lstat;
stat(source, function (err, stats) {
var item = {};
if (err) {
return onError(err);
}
if (stats.isFile() && running >= limit) {
return defer(function () {
getStats(source);
});
}
running++;
Hi.
I encountered the following problem. If you copy a directory containing a number of other directories ncp stops responding. This bug works on ubuntu and does not work on os x.
I think this is due to the fact that adding a directory in turn "running" variable increases, but the function of CB may not be started, because "function cb(skipped)" running only with files.
On my computer at work, I rewrote this section so: before
after
Your thoughts on this subject?