FluentFTP icon indicating copy to clipboard operation
FluentFTP copied to clipboard

OpenRead(path) does not respect DownloadDataType

Open FlyingFoX opened this issue 7 years ago • 1 comments

FTP OS: Windows

FTP Server: Windows CE 7 ARM

Reading a file with the FtpClient.OpenRead(path) method does not respect the setting in FtpClient.DownloadDataType. It just defaults to Binary. See the source https://github.com/robinrodricks/FluentFTP/blob/40b92262bccc6bc0fb1ed6a48ac0ce6e2a524d5f/FluentFTP/Client/FtpClient_LowLevel.cs#L1022

This could be a problem on Windows CE, because that server can only handle ASCII connections.

It would be nice if either the doc string to OpenRead(path) would announce that it is only using Binary mode or better if it respected the FtpClient.DownloadDataType setting.

Logs :

<paste logs here but DO NOT delete the lines above and below this line>

FlyingFoX avatar Oct 23 '19 11:10 FlyingFoX

Sorry that's not a feature request. You are using the wrong overload. DownloadDataType is only for the high level API.

Use this: OpenRead(string path, FtpDataType type) so client.OpenRead("...", FtpDataType.ASCII)

robinrodricks avatar Oct 23 '19 13:10 robinrodricks