aboutsummaryrefslogtreecommitdiff
path: root/modules/core/module-fs.js
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-06-01 18:00:38 +0200
committerAgando <roduccomm@gmail.com>2026-06-01 18:00:38 +0200
commitb839e58aa45da1945d0c46c8070b4e7016c59f94 (patch)
treed394c7ee9c338e8f449f9f09e53e59f8d41ec5c1 /modules/core/module-fs.js
parent6aed9c9e0252b0c8f681a358e5a8707271454137 (diff)
auto: 2026-06-01_18:00 changes
Diffstat (limited to 'modules/core/module-fs.js')
-rw-r--r--modules/core/module-fs.js2
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);