login about faq

If I specify a ListPattern (e.g., ".txt"), NumFilesAndDirs returns -1 if no files match the pattern. If I keep all the same settings but a file matches the pattern, it succeeds. If I set ListPattern to "" it succeeds.

Here is the LastErrorText:

    DllDate: Apr 11 2013
    UnlockPrefix: ****
    Username: ****
    Architecture: Little Endian; 32-bit
    Language: .NET 4.0
    VerboseLogging: 0
    FTP directory cache not fresh.  Fetching dir listing...
      supportsMLSD: 0
      MLSD is only used for full directory listings.  Using LIST instead...
        Sent PROT P command.
        ProtPResponse: 200 PROT command successful.
        Passive transfer mode
          hostAddr: ****
            hostname: ****
            port: 52574
            ConnectTimeoutMs_1: 30000
            calling ConnectSocket2
            IPV6 enabled connect with NO heartbeat.
            This is an IPV4 numeric address...
                ai_flags: 4
                ai_family: 2
                ai_socktype: 1
                ai_protocol: 0
                ai_addrlen: 16
                ai_canonname: (NULL)
            Connect using IPV4.
            ipAddress1: ****
            myIP_3: ****
            myPort_3: 50873
            connect successful (2)
              SO_SNDBUF: 8192
              SO_RCVBUF: 8192
              TCP_NODELAY: 8192
          sendingCommand: LIST *.dat
        Failed to convert listDir data socket to TLS
    N: -1

asked Apr 24 '13 at 18:28

WilliamW's gravatar image


In the FTP protocol, directory listings are transferred on a separate data channel just like file download and uploads. It must be that for this FTP server, when no files match the pattern, that it entirely skips the establishment of the data channel (which is why you see the error listed as "Failed to convert listDir data socket to TLS")

I'll investigate. If I cannot reproduce the problem, it's likely because the FTP servers I have for testing don't behave in this way. In that case, I'll try to make a change that should work, and then you can test it. (The new build may take a day or so because of other work in progress..)

I'll post here when the new build is ready.


answered Apr 25 '13 at 08:32

chilkat's gravatar image

chilkat ♦♦

The server is IIS7 on Windows Server 2008. Note that if I use "" as the pattern it works OK, returning a count of 0. I'm not in a rush for a fix--I'm working around it by using "" and doing the filtering myself.

(Apr 25 '13 at 08:44) WilliamW
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Apr 24 '13 at 18:28

Seen: 2,667 times

Last updated: Apr 25 '13 at 08:44

powered by OSQA