Re: Waiting for other copy peer...

"Alexander V. Lukyanov" <[email protected]>
Newsgroups gmane.network.lftp.devel
Message-ID <[email protected]>
On Wed, Mar 09, 2005 at 03:40:20AM -0500, James Wald wrote:
> however, many commands do not work anymore.  I opened a new instance of lftp
> and found the issue is also caused by "cd .." so I can not get back to the
> root of the FTP.  I'm not sure if this problem existed in previous versions
> but I probably would have noticed by now, it is easily recreated by using
> "cd .." once or cd /.

This patch should fix the problem. (it was introduced in the rc1)

--
   Alexander.                      | http://www.yars.free.net/~lav/
diff (text/plain, 557 B)
Index: misc.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/misc.cc,v
retrieving revision 1.70
diff -u -p -r1.70 misc.cc
--- misc.cc	5 Mar 2005 06:53:17 -0000	1.70
+++ misc.cc	9 Mar 2005 09:18:33 -0000
@@ -809,7 +809,10 @@ char *strip_trailing_slashes(char *ret)
    int len=strlen(ret);
    while(len>0 && ret[len-1]=='/')
       len--;
-   ret[len]=0;
+   if(len==0 && ret[0]=='/')
+      len=1+(ret[1]=='/');
+   if(len>0)
+      ret[len]=0;
    return ret;
 }
 char *dirname_modify(char *ret)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.