indy 10 Directorylisting not parsing list result

Giganews Newsgroups
Subject: indy 10 Directorylisting not parsing list result
Posted by:  Marc Pelletier (marc@stopspam.goldak.ca)
Date: Tue, 26 Apr 2005

Hello,

I recently upgraded an older version of indy (9.0.??) to version 10, and
now my application no longer works. After doing a listing I refer to the
DirectoryListing, but it is no longer being parsed properly and I get 0
items, even though there are items in the ListResult property.

The code looks like this

    ftpSync.List( LS );
    dirPrefix := ftpSync.RetrieveCurrentDir;
    for i := 0 to LS.Count - 1 do
    begin
      Item := ftpSync.DirectoryListing.items[i];

Previously I had been setting the directory listing format to flfUnix,
but that doesn't seem to be necessary any more. I've stepped into the
DirectoryListing code and it seems to be going astray in the
TIdFTPRegParseList.CheckListParseCapa method, where FindParserbyDirData
is returning nil.

The input to that function in this case is as follows
AListing: 'total 11'#$D#$A'drwxrw-rw- 1 root  root  0 Apr 15 11:45 .'#$D#
$A'drwxrw-rw- 1 root  root  0 Apr 15 11:45 ..'#$D#$A'drwxrw-rw- 1 root
root  0 Apr  4 09:27 bin'#$D#$A'drwxrw-rw- 1 root  root  0 Apr  5 14:27
DDonkey'#$D#$A'drwxrw-rw- 1 root  root  0 Apr  4 09:27 GET'#$D#$A'drwxrw-
rw- 1 root  root  0 Apr  4 09:27 gx'#$D#$A'drwxrw-rw- 1 root  root  0 Apr
15 11:45 gxdev'#$D#$A'drwxrw-rw- 1 root  root  0 Apr  4 09:27 Logos'#$D#
$A'drwxrw-rw- 1 root  root  0 Apr  4 09:27 omn'#$D#$A'drwxrw-rw- 1 root
root  0 Apr  4 09:27 tbl'#$D#$A'drwxrw-rw- 1 root  root  0 Apr  4 09:27
User'#$D#$A

ASysDescript: 'UNIX Type: L8 Server: "WarFTPd 1.82.00-RC10" OS: "WIN32
(Windows .NET Server 2003 5.2 3790 x86 2-CPU)"'

ADetails: true

Any ideas anyone?

Thanks

Marc Pelletier
Goldak Airborne Surveys

Replies