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 <michael.k@radency.com>
  • Loading branch information
maspio and michael-radency committed Jul 21, 2023
1 parent 08331c6 commit 995d5cc
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 995d5cc

Please sign in to comment.