mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(size) emit: size -> file
This commit is contained in:
parent
c96a57c310
commit
4debada2db
1 changed files with 3 additions and 3 deletions
|
|
@ -34,8 +34,8 @@
|
|||
stopOnError = options.stopOnError;
|
||||
}
|
||||
|
||||
emitter.on('size', function(size) {
|
||||
total += size || 0;
|
||||
emitter.on('file', function(file, stat) {
|
||||
total += stat.size || 0;
|
||||
});
|
||||
|
||||
emitter.on('error', function(error) {
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
isDir = stat.isDirectory();
|
||||
|
||||
if (!isDir)
|
||||
emitter.emit('size', stat.size);
|
||||
emitter.emit('file', dir, stat);
|
||||
else if (isDir) {
|
||||
++asyncRunning;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue