fix(utils): fix recursive dirs util
This commit is contained in:
parent
a8f21068fc
commit
02d6346b01
1 changed files with 1 additions and 2 deletions
|
|
@ -10,8 +10,7 @@ export function recursivelyReaddir(dir: string, depth: number = 100) {
|
|||
const stat = fs.lstatSync(targetDir);
|
||||
if (stat.isDirectory()) {
|
||||
const subdirs = recursivelyReaddir(targetDir, depth - 1);
|
||||
const subdirsWithBase = subdirs.map((e) => path.join(dir, e));
|
||||
result.push(...subdirsWithBase);
|
||||
result.push(...subdirs);
|
||||
continue;
|
||||
}
|
||||
result.push(targetDir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue