mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
fix(size) onReaddir: add dir
This commit is contained in:
parent
3822b3bc79
commit
75bc7134a4
1 changed files with 5 additions and 3 deletions
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
}
|
||||
|
||||
processDir(dir, calcSize, {stopOnError: false}, function(error) {
|
||||
processDir(dir, calcSize, options, function(error) {
|
||||
var result;
|
||||
|
||||
if (type !== 'raw')
|
||||
|
|
@ -87,7 +87,9 @@
|
|||
func(null, stat.size);
|
||||
else if (isDir) {
|
||||
++asyncRunning;
|
||||
fs.readdir(dir, onReaddir);
|
||||
fs.readdir(dir, function(error, files) {
|
||||
onReaddir(error, files, dir);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +97,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
function onReaddir(error, files) {
|
||||
function onReaddir(error, files, dir) {
|
||||
var n;
|
||||
|
||||
asyncRunning--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue