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

added newFilesOnly

Open limikael opened this issue 2 years ago • 2 comments

This PR adds a newFilesOnly option. In order to solve e.g. https://github.com/simonh1000/ftp-deploy/issues/42.

It does it slightly different than https://github.com/simonh1000/ftp-deploy/pull/141 in that it doesn't rely on any state stored on the server. Also slightly different from https://github.com/simonh1000/ftp-deploy/pull/100 in that it doesn't use the file date obtained from a remote directory listing. Rather it uses the MDTM command. The reason is that the MDTM command is guaranteed to send back the time in GMT as of RFC 3659. The time in the directory listing in local server time, and this causes problems if the server and client are in different time zones.

However, there is a bug in the node-ftp library when parsing the time returned from the MDTM command, so it is still parsed as local time rather than GMT. I submitted a PR here: node-ftp. In the meantime, I also included the fix in the source code for ftp-deploy.

limikael avatar Feb 23 '23 04:02 limikael

This looks interesting, but I will need a while to review it as I have a lot on my plate at present

simonh1000 avatar Feb 23 '23 08:02 simonh1000

Cool cool! Thanks for quick reply... Take your time!

limikael avatar Feb 25 '23 04:02 limikael