Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Fix listFiles #1040

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/electron/providers/storage/localFileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ export default class LocalFileSystem implements IStorageProvider {
console.log(`Listing files from ${normalizedPath}`);
const files = await this.listItems(normalizedPath, (stats) => !stats.isDirectory());
const directories = await this.listItems(normalizedPath, (stats) => stats.isDirectory());
await directories.forEachAsync(async (directory) => {
await Promise.all(directories.map(async (directory) => {
const directoryFiles = await this.listFiles(directory);
directoryFiles.forEach((file) => files.push(file));
});
}));
return files;
}

Expand Down