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:
Marcus 2023-07-21 11:07:49 +02:00 committed by GitHub
parent 08331c63fb
commit 995d5cc470
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}