Closed jeromew closed 7 years ago
note: I went too fast and did not see that you had tests on this so this will probably break tests. You can either accept it and change the tests or I will look at it early next week. Tell me what you think and if the diff is ok with you
You can update the tests and I will merge the pull request.
Thank you for your collaboration :)
@Atlinux I updated my PR with tests on the feature. I added a prepareLFTPOptions method so that the lftp options can be tested without launching lftp (basically this breaks exec in 2 : 'prepare' then 'spawn') I hope you will agree on this.
This showed a hidden bug on protocol
saying ".toLowerCase" cannot be called on undefined in the cases where protocol was not defined in the options. I added a default value for protocol ('ftp'). This lead to some changes because of the way host is modified with a 'ftp://' prefix. Here again I hope you will agree with my modification.
Keep me posted.
Great job @jeromew
I changed to test on password allow for a simple
configuration for anonymous access. Otherwise, password was required.