[BUG] Option "Include All Subdirectories" can lead to infinite loop in File Reader with SFTP #5988
Labels
bug
Something isn't working
Fix-Commited
Issue fixed and will be available in milestone
Internal-Issue-Created
An issue has been created in NextGen's internal issue tracker
RS-12023
triaged
Milestone
Describe the bug
When using the "File Reader" with SFTP, using the "Include All Subdirectories" can lead to an infinite loop recursion.
I thought at first that the "Include All Subdirectories" didn't worked, but in fact it's because the connector enters an infinite loop and never comes back from its first poll.
This is because the
listDirectories
includes both "." and ".." directories, which should be excluded from the recursion.Expected behavior
The "." and ".." directories should not be included in the recursion.
Actual behavior
The "." and ".." directories are included in the recursion.
Screenshots
Here's a image of my debbugger while inverstigating this problem, showing the directoryStack field.
Environment (please complete the following information):
Workaround(s)
I successfully fixed the problem on my local machine by changing the
SftpConnection#listDirectories
function from this:to this
But I'm not sure it is the right way to fix this soo I'll let you decide.
The text was updated successfully, but these errors were encountered: