OS: Windows 7
Protocol: FTP (but also FTPS)
The problem is very specific and fully reproducible. It only happens handling empty directories on a specific ftp server.
I can provide, of course privately, my account and a temporary password to connect to the server.
I am using the (relative) new cloud storage provider called WASABI (www.wasabi.com).
The service has a free trial (no credit card, no contract, fully anonymous) of 30 days.
So anyone can open a temporary account and try it.
The cloud storage is organized as "Buckets" -- basically, directories in a filesystem.
After creating your account, you can turn on the option "Access your cloud space via FTP".
The ftp server is: s3.wasabisys.com (to use that, you need to create your buckets choosing region: us-east-1).
Of course, I enabled the FTP server and I connected via WinSCP.
It works perfectly, but there is ONE problem.
WinSCP is unable to handle any EMPTY DIRECTORY in the wasabi cloud space.
I mean: You CANNOT HAVE any empty directory inside your cloud space, otherwise WinSCP aborts the connection.
The error message is quite clear, returned after the unsuccessfully login: "Lost connection. Could not retrieve directory listing. Error listing directory: /yourbucket/emptydir"
Where "emptydir" is an empty directory.
1. If you REMOVE the empty directory from the cloud, WinSCP works without issues with all the other directories.
2. If you use a different ftp client (I used YummyFTP on Mac) you don't have problems handling empty directories.
Attached is the log of the WinSCP connection, using DEBUG2 logging.
Thanks for any support.