19 Aug 2008 10:24
Re: SFTP to freeftpd on windows
Alexander V. Lukyanov <lav <at> netis.ru>
2008-08-19 08:24:07 GMT
2008-08-19 08:24:07 GMT
On Mon, Aug 18, 2008 at 02:44:31PM +1000, Paul Wickham wrote: > <--- got a packet, length=1676, type=104(NAME), id=8 > ---- file name count=15 > drw-rw-rw 1 root root 0 Aug 18 11:48 . > drw-rw-rw 1 root root 0 Aug 18 11:48 .. I suspect the rest of 15 file entries were invalid in some way. Please apply this patch and redo the ls with debug 10. -- Alexander.
Index: SFtp.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/SFtp.cc,v
retrieving revision 1.80
diff -u -p -r1.80 SFtp.cc
--- SFtp.cc 16 May 2008 08:45:01 -0000 1.80
+++ SFtp.cc 19 Aug 2008 08:18:35 -0000
<at> <at> -1912,7 +1912,7 <at> <at> void SFtp::Request_RENAME::Pack(Buffer *
const char *SFtp::utf8_to_lc(const char *s)
{
- if(!recv_translate)
+ if(!recv_translate || !s)
return s;
recv_translate->ResetTranslation();
<at> <at> -1925,7 +1925,7 <at> <at> const char *SFtp::utf8_to_lc(const char
}
const char *SFtp::lc_to_utf8(const char *s)
{
- if(!send_translate)
+ if(!send_translate || !s)
return s;
send_translate->ResetTranslation();
<at> <at> -1947,6 +1947,10 <at> <at> FileInfo *SFtp::MakeFileInfo(const NameA
{
const FileAttrs *a=&na->attrs;
const char *name=utf8_to_lc(na->name);
+ const char *longname=utf8_to_lc(na->longname);
+
+ LogNote(10,"NameAttrs(name=\"%s\",type=%d,longname=\"%s\")\n",name?name:"",a->type,longname?longname:"");
+
if(!name || !name[0])
return 0;
if(strchr(name,'/'))
<at> <at> -1961,8 +1965,8 <at> <at> FileInfo *SFtp::MakeFileInfo(const NameA
case SSH_FILEXFER_TYPE_SYMLINK: fi->SetType(fi->SYMLINK); break;
default: return 0;
}
- if(na->longname)
- fi->SetLongName(utf8_to_lc(na->longname));
+ if(longname)
+ fi->SetLongName(longname);
if(a->flags&SSH_FILEXFER_ATTR_SIZE)
fi->SetSize(a->size);
if(a->flags&SSH_FILEXFER_ATTR_UIDGID)
RSS Feed