On Mon, May 16, 2005 at 09:46:10AM -0500, Brian Hellman wrote:
> Found the problem, it is when a directory has a file in it with a tilda
> '~' at the beggining, lftp copies it then the next time removes it. It
> will also do this with any file that has a space in the beggining. Any
> thoughts of how to get around this?

This patch seems to fix the problem.

Index: SFtp.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/SFtp.cc,v
retrieving revision 1.44
diff -u -p -r1.44 SFtp.cc
--- SFtp.cc     15 Apr 2005 05:21:53 -0000      1.44
+++ SFtp.cc     20 May 2005 10:06:29 -0000
@@ -1825,6 +1825,10 @@ FileInfo *SFtp::MakeFileInfo(const NameA
    const char *name=utf8_to_lc(na->name);
    if(!name || !name[0])
       return 0;
+   if(strchr(name,'/'))
+      return 0;
+   if(name[0]=='~')
+      name=dir_file(".",name);
    FileInfo *fi=new FileInfo(name);
    switch(a->type)
    {

Reply via email to