mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
feature(pipe) add notEnd
This commit is contained in:
parent
4662a29dc2
commit
d9957c52d7
2 changed files with 7 additions and 3 deletions
|
|
@ -82,13 +82,15 @@
|
|||
pipe.create({
|
||||
from : name,
|
||||
write : writeStream,
|
||||
notEnd : true,
|
||||
callback: function(error) {
|
||||
if (error)
|
||||
Util.exec(callback, error);
|
||||
else
|
||||
if (!length)
|
||||
if (!length) {
|
||||
writeStream.end();
|
||||
Util.exec(callback);
|
||||
else
|
||||
} else
|
||||
readPipe(files, dir, writeStream, callback);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -51,7 +51,9 @@
|
|||
});
|
||||
|
||||
lRead.on('end', function() {
|
||||
lWrite.end();
|
||||
if (!p.notEnd)
|
||||
lWrite.end();
|
||||
|
||||
Util.exec(p.callback);
|
||||
});
|
||||
}, function(pCallBack) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue