On Wed, Nov 12, 2003 at 05:41:29PM +0100, Jean-Yves Simon wrote:
> Imagine a directory on a ftp that is being uploaded. While it's
> uploading (let's say 10 files are uploaded already, number 11 is
> uploading) do:
> mirror -c thedir
> lftp downloads the first 10 files, by that time the 11th is complete,
> and thus completely downloaded too.
> 
> redo:
> mirror -c thedir    (which is now completed with, let us say 15 files)
> lftp deletes file 11 of the harddisk, redownload it again, and complete
> the dir to the 15th file.
> 
> 
> That file deletion is rather annoying.

This is explainable. While uploading, the modification time is not
preserved, so the complete uploaded file is newer than the partial file whose
download was started before it was complete. lftp gets modification time
before it starts transfer, so the complete local file became older than
the complete remote file. In such case lftp does not consider older local file
an incomplete copy of remote file.

This can be fixed: just drop modification time information if downloaded more
than there was at transfer beginning.

-- 
   Alexander.                      | http://www.yars.free.net/~lav/  

Reply via email to