mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
fix(FTP Node): List recursive ignore . and .. to prevent infinite loops (#6707)
ignore . and .. to prevent infinite loop Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
@@ -64,6 +64,10 @@ async function callRecursiveList(
|
|||||||
|
|
||||||
// Is directory
|
// Is directory
|
||||||
if (item.type === 'd') {
|
if (item.type === 'd') {
|
||||||
|
// ignore . and .. to prevent infinite loop
|
||||||
|
if (item.name === '.' || item.name === '..') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
pathArray.push(currentPath);
|
pathArray.push(currentPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user