Escape spaces in file names before calling ls in FTP.exists#64
Escape spaces in file names before calling ls in FTP.exists#64ryanmcfall wants to merge 5 commits intotimburgess:masterfrom
Conversation
…he last synchronization date to avoid checking the size of the remote file if it hasn't been modified locally.
…cation date is sufficient
…ked (e.g. Cancel button is not pressed)
|
Thanks for this and awesome to see contributions. With changes in |
|
Tim: Note that I was unaware that committing to the forked version of the repository after submitting a pull request would result in those changes being part of the pull request (I thought it was static). So the original pull request is just the commit with SHA 1feb3d0, which only changes FTP.js The subsequent commits eliminate the checking of file sizes on the server altogether, by recording (in .ftpsync_settings) the local time when a sync was last completed, and then comparing file modification dates to that date in order to determine what needs to be uploaded. This change seems to be working for me, but more eyes on it and additional testing would certainly be good. |
|
OK. I have cherry-picked |
This fixes a bug in which filenames containing spaces are uploaded to the server every time that a sync operation is initiated. The bug occurs because, at least on the ftp server that I am using, the
lscommand invokes the callback with adataargument whose length property is zero, therefore indicating to ftp-sync that the file does not exist on the server.This should potentially be considered a bug in jsftp rather than ftp-sync, so perhaps it should be reported there instead; I'll leave that decision to you.