Skip to content

Commit

Permalink
fix(FTP Node): List recursive ignore . and .. to prevent infinite loo…
Browse files Browse the repository at this point in the history
…ps (#6707)

ignore . and .. to prevent infinite loop

Co-authored-by: Michael Kret <[email protected]>
  • Loading branch information
2 people authored and netroy committed Aug 17, 2023
1 parent 2e64c9d commit 6a787dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/nodes-base/nodes/Ftp/Ftp.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ async function callRecursiveList(

// Is directory
if (item.type === 'd') {
// ignore . and .. to prevent infinite loop
if (item.name === '.' || item.name === '..') {
return;
}
pathArray.push(currentPath);
}

Expand Down

0 comments on commit 6a787dd

Please sign in to comment.