ftp-deploy
ftp-deploy copied to clipboard
added newFilesOnly
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.
This looks interesting, but I will need a while to review it as I have a lot on my plate at present
Cool cool! Thanks for quick reply... Take your time!