mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(pipe) create: add ifExec
This commit is contained in:
parent
109e412ae7
commit
beca4c609f
1 changed files with 4 additions and 7 deletions
|
|
@ -45,15 +45,12 @@
|
|||
lWrite.on('error', lError);
|
||||
lRead.on('error', lError);
|
||||
|
||||
if (lIsFsWrite)
|
||||
lWrite.on('open', function() {
|
||||
lRead.pipe(lWrite);
|
||||
lRead.on('end', Util.retExec(p.callback));
|
||||
});
|
||||
else {
|
||||
Util.ifExec(!lIsFsWrite, function() {
|
||||
lRead.pipe(lWrite);
|
||||
lRead.on('end', Util.retExec(p.callback));
|
||||
}
|
||||
}, function(pCallBack) {
|
||||
lWrite.on('open', pCallBack);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue