Re: BUG on TIdFTP (TransferType is not set to Binary) - Easy to fix

Giganews Newsgroups
Subject: Re: BUG on TIdFTP (TransferType is not set to Binary) - Easy to fix
Posted by:  Remy Lebeau \(Indy Team\) (no.spam@no.spam.com)
Date: Fri, 28 Dec 2007

"diegoqueiroz" <garoto.bur…@gmail.com> wrote in message
news:0E6919CF9342E340garoto.bur…@gmail.com...

> All files are sent via ASCII Transfer Type Mode when the
> AutoLogin is set to False.

The purpose of setting AutoLogin to False is so that you can control the
order and timing of the startup commands on your own.  That includes calling
SendTransferType() yourself after the connection has been established when
you are actually ready to tell the server the type you want to use.

> This is due a incorrect implementation of Connect method, where
> the SendTransferType protected method is called inside the
> "if Autologin..." block.

That is not a bug.  That is an intentional change.  A lot of the "AutoLogin"
functionality has been separated out so the user can choose when to invoke
them.

>    { Set the type of transfer to Binary }
>    MyFTP.TransferType := ftBinary;
>    // Pay attention to this: I'm explicit setting the Transfer Type to
> BINARY

But you are setting it before connecting.  Set it afterwards, or else set
AutoLogin back to True.

Gambit

Replies

In response to

BUG on TIdFTP (TransferType is not set to Binary) - Easy to fix posted by diegoqueiroz on Fri, 28 Dec 2007