Recent

Author Topic: indy ftp client - listing files (SIGSEGV)  (Read 10360 times)

seba22

  • Full Member
  • ***
  • Posts: 136
indy ftp client - listing files (SIGSEGV)
« on: January 08, 2011, 12:50:35 pm »
Welcome,

I'm learning how to use indy ftp to make simple connection with my server.

Now i would like to get list of files in directory.
Code: [Select]
procedure TForm1.Button1Click(Sender: TObject);
var
numFiles,i:integer;
aFilesftp: array of string;
abc:TStringList;
begin
  ftp.Username:='xxxxl';
  ftp.host:='xxxx';
  ftp.Password:='xxxx';
  ftp.Connect;
  abc.Create;
  ftp.ChangeDir( '/' );
  ftp.List(abc,'*.*',true);

 

end; 


(compile without error)
It throw crash and "SIGSEGV" error.
(open only assembler window, no hint what may be wrong)

Can someone show me where i make mistake ?



Regards

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11947
  • FPC developer.
Re: indy ftp client - listing files (SIGSEGV)
« Reply #1 on: January 08, 2011, 01:37:38 pm »
Has probably nothing to do with Indy, but with how you create classes.

try abc:=TStringlist.Create;

seba22

  • Full Member
  • ***
  • Posts: 136
Re: indy ftp client - listing files (SIGSEGV)
« Reply #2 on: January 09, 2011, 09:49:04 pm »
Thank Yout,

Confirmed, that's help ;)

Regards

 

TinyPortal © 2005-2018