Re: TIdFTP.List Question

Giganews Newsgroups
Subject: Re: TIdFTP.List Question
Posted by:  Remy Lebeau \(Indy Team\) (no.spam@no.spam.com)
Date: Mon, 8 Jun 2009

"Pascal" <pcoenen@telenetdotbe> wrote in message
news:2612AE2C4484E340pcoenen@telenetdotbe...

> - ADetails = False so I'm not using ExtListDir(ADest)
> - I've been debugging this for a couple of hours and the part were
> the transfertype is put into ASCII before the actual list command
> and afterwards is restored to ftBinary if the original type wasn't
> ASCII isn't working (I think, I'm quite sure).

Please show the actual FTP commands that TIdLogDebug is intercepting.

>  if LTrans <> ftASCII then begin
>    Self.TransferType := ftASCII;
>    --> After this force it using SendTranferType
>  end;

The property setter for the TransferType already calls SendTransferType()
internally:

procedure TIdFTP.SetTransferType(AValue: TIdFTPTransferType);
begin
  if AValue <> FTransferType then begin
    if not Assigned(FDataChannel) then begin
      if Connected then begin
        SendTransferType; // <- here
      end;
      FTransferType := AValue;
    end;
  end;
end;

--
Remy Lebeau (Indy Team)

Replies

In response to

TIdFTP.List Question posted by Pascal on Sat, 6 Jun 2009