Comparing version 2.0.4 to 2.0.5
@@ -143,10 +143,3 @@ "use strict"; | ||
]).spread(function (reader, writer) { | ||
return reader.forEach(function (block) { | ||
return writer.write(block); | ||
}).then(function () { | ||
return Q.all([ | ||
reader.close(), | ||
writer.close() | ||
]); | ||
}); | ||
return reader.copy(writer); | ||
}); | ||
@@ -163,17 +156,17 @@ }; | ||
return sourceFs.exists(target).then(function (targetExists) { | ||
var copySubTree = sourceFs.list(source).then(function (list) { | ||
return Q.all(list.map(function (child) { | ||
return sourceFs.copyTree( | ||
sourceFs.join(source, child), | ||
targetFs.join(target, child), | ||
targetFs | ||
); | ||
})); | ||
}); | ||
function copySubTree() { | ||
return sourceFs.list(source).then(function (list) { | ||
return Q.all(list.map(function (child) { | ||
return sourceFs.copyTree( | ||
sourceFs.join(source, child), | ||
targetFs.join(target, child), | ||
targetFs | ||
); | ||
})); | ||
}); | ||
} | ||
if (targetExists) { | ||
return copySubTree; | ||
return copySubTree(); | ||
} else { | ||
return targetFs.makeDirectory(target).then(function () { | ||
return copySubTree; | ||
}); | ||
return targetFs.makeDirectory(target).then(copySubTree); | ||
} | ||
@@ -180,0 +173,0 @@ }); |
@@ -72,4 +72,6 @@ "use strict"; | ||
} | ||
}, function (error) { | ||
return options.notFound(request); | ||
}); | ||
}, function (reason) { | ||
}, function (error) { | ||
return options.notFound(request); | ||
@@ -76,0 +78,0 @@ }); |
{ | ||
"name": "q-io", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "tag": "future" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
274150
7061