Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a newFilesOnly option. In order to solve e.g. #42.
It does it slightly different than #141 in that it doesn't rely on any state stored on the server. Also slightly different from #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.