diff options
Diffstat (limited to 'modules/core/module-fs.js')
| -rw-r--r-- | modules/core/module-fs.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/core/module-fs.js b/modules/core/module-fs.js index 4ba34b0..ae8b5f4 100644 --- a/modules/core/module-fs.js +++ b/modules/core/module-fs.js @@ -288,7 +288,7 @@ class FileSystemModule { const t = args && args[0] ? args[0] : '.'; if (t === '.') { const dir = this.terminal.fs.getCurrentDir(); if (!dir) return; - let total = 0; Object.keys(dir.content).forEach(k => { total += dir.content[k].content ? dir.content[k].content.length : 0; }); + let total = 0; Object.keys(dir.content).forEach(k => { const node = dir.content[k]; total += node && typeof node.content === 'string' ? node.content.length : 0; }); this.terminal.print(total + '\t' + t); } else { const c = this.terminal.fs.readFile(t); |