On Sat, Sep 21, 2002 at 11:59:54PM +0200, Noel Koethe wrote:
> lftp (2.6.2) has a problem with the percent calculation with
> files larger than 2 gb (http://bugs.debian.org/157019).
> 
> This is the file:
> 
> 2457600000 Sep 21 23:11 bigfile
> 
> lftp www:/> get bigfile
> `bigfile' at 30416896 (100%) 4.29M/s [Receiving data]  

Most probably the server reported incorrect size, so lftp assumes that the
file is complete (100%). If you'd turn on debug, you would see the incorrect
size.

This patch disables percent reporting in such a case:

--- FileCopy.cc 2002/08/28 12:32:17     1.89
+++ FileCopy.cc 2002/09/23 08:12:44
@@ -498,6 +498,8 @@ int FileCopy::GetPercentDone()
       psize=put->range_limit-put->range_start;
    if(psize<0)
       return 100;
+   if(ppos>psize)
+      return -1;
    return percent(ppos,psize);
 }
 const char *FileCopy::GetPercentDoneStr()

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

Reply via email to