226 FTP List response problem on an empty FTP directory

Giganews Newsgroups
Subject: 226 FTP List response problem on an empty FTP directory
Posted by:  Ian Thompson (i…@cygnetlodge.co.uk)
Date: Wed, 26 Sep 2007

Hi Guys,

I've looked through all previous posts and knowledge bases before posting
this query

I am developing a program in D6 using the Indy FTP component (V10.1.5). The
app is intended to poll an FTP server using the list command, waiting in a
loop for any file to appear, viz :

    ftpfilelist.clear;
    repeat
          idftp1.List(ftpfilelist,'',false);
          sleep(10000);  //wait ten seconds
  until  ftpfilelist.count > 0

This works fine if there is a file in the chosen directory, but if there is
no file (and on the first pass into the iteration!) I get the following
error:
    ---------------------------
    Debugger Exception Notification
    ---------------------------
    Project ScanPrint.exe raised exception class EIdReplyRFCError with
message 'Transfer complete.
    Quotas off
    '. Process stopped. Use Step or Run to continue.
    ---------------------------
    OK  Help
    ---------------------------

If I use FTPVoyager or some such to see what's going on (not logged in at
the same time with the same ID, I should say), the replies from the server
to a LIST command performed on an empty directory can be seen as

    150 Opening ASCII mode data connection for file list
    226-Transfer complete
    226 Quotas off

The server I'm testing it with is a ProFTPD 1.3.0 hosted by Someone Out
There.

I cannot figure why this is happening - can anyone help out?

Cheers,

Ian Thompson

Replies