On Thu, Sep 16, 2004 at 03:49:43PM +0200, Ondrej Kavka wrote:
> after updating from 3.0.6, I noticed that whenever I pipe the result
> of a command to another one, lftp crashes and must be killed. For
> example simple 'cls | less' executes as expected, but then lftp simply
> dies and needs to be killed from another shell. Can you confirm this?

Here is a fix. This bug was introduced in 3.0.8 when trying to fix transfer
of empty files.

--
   Alexander.
Index: FileCopy.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/FileCopy.cc,v
retrieving revision 1.103
diff -u -p -r1.103 FileCopy.cc
--- FileCopy.cc 31 Aug 2004 12:14:42 -0000      1.103
+++ FileCopy.cc 16 Sep 2004 14:28:52 -0000
@@ -1314,8 +1314,7 @@ int FileCopyPeerFDStream::Do()
       {
         if(eof)
         {
-           if(getfd()==-1)
-              return m;
+           getfd(); // give it a chance to create empty file. (FIXME - handle tmp 
errors)
            if(!date_set && date!=NO_DATE && do_set_date)
            {
               if(date==NO_DATE_YET)

Reply via email to