🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #958

Problem using TIdFTP in C++ Builder 2007. List() doesn't work

#958
From: Star
Date: Fri, 20 Jul 2007 19:11
28 lines
1653 bytes
Hi,

I wrote a project in C++ Builder 5 a long time ago that
was using TIdFTP from Indy. Now I have updated to C++ Builder 2007
which already comes with Indy but for some reason it's not working 
correctly.

The problem is very simple. If I have this piece of code:

     IdFTP1->Username = "anonymous";
     IdFTP1->Password = "test@test.com";
     IdFTP1->Host = "ftp.borland.com";
     IdFTP1->Port = 21;

     IdFTP1->Connect();

     IdFTP1->List( NULL, "", true);
     for(int i = 0; i < IdFTP1->DirectoryListing->Count; ++i)
     {

     }

For some reason, IdFTP1->DirectoryListing->Count is always 0.
However, this code works ok in my old version of Indy.

What am I missing?

Thanks
Technical Details
Message-ID: <46a108f5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f37f99fb538f42a3,start
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 20 Jul 2007 15:11:22 -0400
From: Star <noemai@noemail.com>
User-Agent: Thunderbird 1.5.0.12 (Windows/20070509)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Problem using TIdFTP in C++ Builder 2007. List() doesn't work
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 70.91.64.254
Message-ID: <46a108f5$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1184958709 70.91.64.254 (20 Jul 2007 12:11:49 -0700)
Lines: 28
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
X-Original-Bytes: 1485