Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Dec : Re: Looking for a good FTP component
| Subject: | Re: Looking for a good FTP component |
| Posted by: | "Jamie Dale" (dale_jam..@yahoo.com) |
| Date: | Wed, 13 Dec 2006 22:17:05 |
"Boian Mitov" <mitov@mitov.com> wrote in message
news:458064fe@newsgroups.borland.com...
> Hi Jamie,
>
> This the the problem at least until version 10.0.52. I will test 10.0.6
> soon. If you directly call IdFTP1.Put( 'c:\CoinsLow.bmp',
> 'CoinsLow.bmp' ); without checking IdFTP1.Connected it will AV. This is a
> bug.
Maybe so, but it is one which can be easily avoided using the code I
supplied. It's very easy, and makes Indy a dream to use.
I know it's a few lines of extra code, but it's not much is it? - Besides,
it will save you endless greif.
Why were you trying to put a file without an active connection anyway? - You
know it wouldn't actually transfer anything.
What exactly is the problem? - Is it the type of error/exception - IE were
you relying on a particular exception which your program could react to? Or
were you just unhappy that it didn't automatically check for a connection
and connect if needed?
If it's the latter then it's very easily overcome. If it's the former... you
could always edit the indy source..
> Jamie Dale wrote:
>> If IdFTP1.Connected then //Make sure it's actually connected first..
>> begin
>> //If connected, do the transfer.
>> IdFTP1.Put( 'c:\CoinsLow.bmp', 'CoinsLow.bmp' );
>> end;
>>
>> Nothing wrong with the component. You simply need to check that the
>> component is connected first. If it isn't then the code above will not
>> execute Put() attempt.