ftp-sample
ftp-sample copied to clipboard
All symlinks are treated as directories
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](https://user-images.githubusercontent.com/425365/33520051-4bc15632-d781-11e7-878d-c1417c484dab.png)
It ends up being treated like a directory in the FTP workspace:
![screen shot 2017-12-02 at 2 10 17 pm](https://user-images.githubusercontent.com/425365/33520056-75947246-d781-11e7-8c13-70862e406b07.png)
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](https://user-images.githubusercontent.com/425365/33520061-953c4146-d781-11e7-99c6-2e44337106ed.png)
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?