BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Indy 9 and 10

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General)
View previous topic :: View next topic  
Author Message
Jack Mason
Guest





PostPosted: Thu Apr 27, 2006 5:03 am    Post subject: Indy 9 and 10 Reply with quote



We have a small application that was originally written under D6. It
compiled and ran using Indy 8 & Indy 9. It basically used the Indy
client FTP to connect, change directories, get a directory list, display
it, then send 4 files, and retrieve 4 files. All worked well for
several years and we cannot remember if we ever recompiled it under D7.

However, we did make a change so it only sent and retrieved 3 files
instead of 4 and recompiled under D7 and Indy 9 (default Indy 9
installed with clean D7). The application no longer runs.

Thinking we somehow screwed up an important line of code, we stripped it
down to just connect, change directories, and get a directory list, and
display the list. This will not run under D7 and Indy 9, and after
several weeks of getting BDS 2006 up and running with 3rd party stuff,
we tried it under BDS 2006 and Indy 10. It gets exactly the same error
as under D7....

1. It connects.
2. It changes directories
3. It gets an exception clas EIdReplyRFCError with message "Failed to
establish connection."

Here is the code:

var Current_Directory: string;
Dir_List: TStringList;

procedure TForm1.Button1Click(Sender: TObject);
begin
Memo_Log.Lines.Clear;
Current_Directory := '/';
with IdFTP1 do
try
Username := User_Name.Text;
Password := Pass_Word.Text;
Host := Server_Name.Text;
Connect;
Memo_Log.Lines.Add('Connected');
Current_Directory := IdFTP1.RetrieveCurrentDir;
IdFTP1.ChangeDir(Current_Directory + '/-');
Memo_Log.Lines.Add('Changed Directories');
IdFTP1.List(Dir_List, '*.*', true);
Memo_Log.Lines.Add('Got Directory List');
DirectoryListBox.Items.Assign(Dir_List);
Memo_Log.Lines.Add('Listed Directory');
finally
IdFTP1.Disconnect;
end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Dir_List := TStringList.Create;
end;

After reading all the problems people have been having with Indy
components, perhaps we should shift to another FTP product? We use the
Indy email component and it seems to work fine.

Any help will be greatly appreciated.
Back to top
Nicholas Sherlock
Guest





PostPosted: Thu Apr 27, 2006 5:03 am    Post subject: Re: Indy 9 and 10 Reply with quote



Jack Mason wrote:
Quote:
Current_Directory := '/';
[..]
IdFTP1.ChangeDir(Current_Directory + '/-');

'//-' is an odd directory name. Are you sure that such a directory
exists on your server?

Cheers,
Nicholas Sherlock

--
http://www.sherlocksoftware.org
Back to top
Jack Mason
Guest





PostPosted: Thu Apr 27, 2006 6:04 am    Post subject: Re: Indy 9 and 10 Reply with quote



Actually, we have tried it without '/', and that seems to work also on
some sites, but not all.
Back to top
Jack Mason
Guest





PostPosted: Thu Apr 27, 2006 6:04 am    Post subject: Re: Indy 9 and 10 Reply with quote

When we use '\' for the directory, we get an error trying to change the
directory. Apparently, everyone recognizes the unix root directory '/',
but the FTP stuff doesn't recognize the Windows root directory '\'.
Back to top
Nicholas Sherlock
Guest





PostPosted: Thu Apr 27, 2006 10:03 am    Post subject: Re: Indy 9 and 10 Reply with quote

Jack Mason wrote:
Quote:
When we use '\' for the directory, we get an error trying to change the
directory. Apparently, everyone recognizes the unix root directory '/',
but the FTP stuff doesn't recognize the Windows root directory '\'.

Yes, but you are trying to change to directory '//-'. That's TWO slashes
and a dash. You only want one slash, and it would be very odd to have a
folder with the name '-'.

Cheers,
Nicholas Sherlock

--
http://www.sherlocksoftware.org
Back to top
Jack Mason
Guest





PostPosted: Fri Apr 28, 2006 3:03 am    Post subject: Re: Indy 9 and 10 Reply with quote

The folder name is actually '-'. And it really does change to that
directory. If we eliminate the change directory command and substitute
a put, the put file name will be created in the directory, but the body
of the file will not be transferred. Apparently the handshaking between
the FTP server and the FTP client fails with the same error whether
responding to a list directory request or sending a file.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.