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:

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

asked Apr 24 '13 at 18:28

WilliamW's gravatar image

WilliamW
11446


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.

link

answered Apr 25 '13 at 08:32

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

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

By RSS:

Answers

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

Tags:

×131

Asked: Apr 24 '13 at 18:28

Seen: 1,725 times

Last updated: Apr 25 '13 at 08:44

powered by OSQA