mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(size) callback once if error
This commit is contained in:
parent
d07a2bda7a
commit
36bd0ffc75
1 changed files with 8 additions and 3 deletions
|
|
@ -54,7 +54,10 @@
|
|||
fileCounter = 1,
|
||||
|
||||
execCallBack = function () {
|
||||
if (!fileCounter && !asyncRunning)
|
||||
var noErrors = !wasError || !stopOnError,
|
||||
yesAllDone = !fileCounter && !asyncRunning;
|
||||
|
||||
if (yesAllDone && noErrors)
|
||||
callback();
|
||||
},
|
||||
|
||||
|
|
@ -71,8 +74,10 @@
|
|||
|
||||
if (!wasError || !stopOnError) {
|
||||
if (error) {
|
||||
wasError = true;
|
||||
callback(error);
|
||||
if (stopOnError) {
|
||||
wasError = true;
|
||||
callback(error);
|
||||
}
|
||||
} else {
|
||||
isDir = stat.isDirectory();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue