FluentFTP icon indicating copy to clipboard operation
FluentFTP copied to clipboard

DownloadDirectory may not work on custom systems due to internal FileListing

Open Adhara3 opened this issue 4 years ago • 3 comments

FTP OS: Embedded

FTP Server: Custom

Computer OS: Windows

FluentFTP Version: 35.0.5

DownloadDirectory is internally performing a this.GetListing(remoteFolder, FtpListOption.Size | FtpListOption.Recursive) so using specific parameters that may not work as expected on all system. Example: FtpListOption.NoPath may be needed in order to work.

This should be probably part of the FtpServerBase class. Please note that the enum provides some behavioral flags (Recursive) while others are more archictural (NoPath, ForceList) and the BaseServer class should fill the latter kind

Regards A

Adhara3 avatar Oct 30 '21 16:10 Adhara3

Good idea, any suggestions how to implement this? A new property/method in FtpServerBase?

robinrodricks avatar Nov 16 '21 18:11 robinrodricks

Hi,

yes I would probably adda new method with a signature like the following FtpListOption DecorateFileListOptions(FtpListOption options)

I can do the pull request if you want

Cheers A

Adhara3 avatar Nov 23 '21 11:11 Adhara3

@Adhara3 please don't need to ask my permission to make pull requests, its hard to check so many active tickets. If you have any suggestion, please just file a PR and we can take it forward. I accept most PRs straightaway unless they cause a major conflict.

robinrodricks avatar Jan 01 '22 14:01 robinrodricks

Added to the bucket list. We will pick this up as and when we have free time. Comment on this issue if you want us to prioritize it. Thanks!

robinrodricks avatar Sep 19 '22 14:09 robinrodricks