IDFtp.directorylisting属性出错;紧急求助
procedure TMainForm.ChageDir(DirName: String);
Var
LS: TStringList;
begin
LS := TStringList.Create;
try
SetFunctionButtons(false);
IdFTP1.ChangeDir(DirName);
IdFTP1.TransferType := ftASCII;
CurrentDirEdit.Text := IdFTP1.RetrieveCurrentDir;
DirectoryListBox.Items.Clear;
IdFTP1.List(LS);
DirectoryListBox.Items.Assign(LS);
if DirectoryListBox.Items.Count > 0 then
if AnsiPos('total', DirectoryListBox.Items[0]) > 0 then DirectoryListBox.Items.Delete(0);
finally
SetFunctionButtons(true);
LS.Free;
end;
end;
上述过程;执行时报错:
错误提示为:
---------------------------
Debugger Exception Notification
---------------------------
Project FTPDemo.exe raised exception class EIdInvalidFTPListingFormat with message 'Unknown FTP listing format'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------