If I specify a ListPattern (e.g., ".txt"), NumFilesAndDirs returns -1 if no files match the pattern. If I keep all the same settings but a file matches the pattern, it succeeds. If I set ListPattern to "" it succeeds.
Here is the LastErrorText:
asked Apr 24 '13 at 18:28
In the FTP protocol, directory listings are transferred on a separate data channel just like file download and uploads. It must be that for this FTP server, when no files match the pattern, that it entirely skips the establishment of the data channel (which is why you see the error listed as "Failed to convert listDir data socket to TLS")
I'll investigate. If I cannot reproduce the problem, it's likely because the FTP servers I have for testing don't behave in this way. In that case, I'll try to make a change that should work, and then you can test it. (The new build may take a day or so because of other work in progress..)
I'll post here when the new build is ready.
answered Apr 25 '13 at 08:32