Skip to content

Commit 3a292b0

Browse files
committed
Simplify walkDirectory
The check for `seenFiles` is not necessary since we do not need to handle symbolic links.
1 parent 7baf2d0 commit 3a292b0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

extensions/ql-vscode/src/helpers.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,13 +568,10 @@ export async function createTimestampFile(storagePath: string) {
568568
*
569569
* @return An iterator of the full path to all files recursively found in the directory.
570570
*/
571-
export async function* walkDirectory(dir: string): AsyncIterableIterator<string> {
571+
export async function* walkDirectory(dir: string): AsyncIterableIterator<string> {
572572
const seenFiles = new Set<string>();
573573
for await (const d of await fs.opendir(dir)) {
574574
const entry = path.join(dir, d.name);
575-
if (seenFiles.has(entry)) {
576-
continue;
577-
}
578575
seenFiles.add(entry);
579576
if (d.isDirectory()) {
580577
yield* walkDirectory(entry);

0 commit comments

Comments
 (0)