ftp-sample icon indicating copy to clipboard operation
ftp-sample copied to clipboard

All symlinks are treated as directories

Open amp343 opened this issue 6 years ago • 0 comments

If I have a remote path that includes a symlink to a file (d.txt) like:

screen shot 2017-12-02 at 2 10 48 pm

It ends up being treated like a directory in the FTP workspace:

screen shot 2017-12-02 at 2 10 17 pm

The optimal behavior I would expect would be for the filesystem provider to treat d.txt as a file.

I notice this is also the behavior in some ftp clients, like Filezilla for example:

screen shot 2017-12-02 at 2 11 27 pm

If this is the underlying implementation, it seems that anything whose type is not File (0) will be treated as a directory. Since Symlinks are type 2, they would be handled in the else block where fileStat.isDirectory is set to true.

Is there some solution to this through the existing API, or is it something that might be handleable in a final API?

amp343 avatar Dec 02 '17 21:12 amp343