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/
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)

Reply via email to