diff options
Diffstat (limited to 'js/src/tool/ls.ts')
| -rw-r--r-- | js/src/tool/ls.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/src/tool/ls.ts b/js/src/tool/ls.ts index 286ac30a2..c481b4d8d 100644 --- a/js/src/tool/ls.ts +++ b/js/src/tool/ls.ts @@ -125,12 +125,11 @@ async function listDirectory( results.push(fullPath + path.sep); } - if (results.length < limit) { - await walk(fullPath); - } else { + if (results.length >= limit) { truncated = true; return; } + await walk(fullPath); } else if (entry.isFile()) { if (fullPath !== initialPath) { results.push(fullPath); |
