Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-227

Support for cygwin

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 2.0
    • None
    • None
    • Client: Windows Server 2003. FTP Server: Tumbleweed running on Windows Server 2003 running CYGWIN. Commons net version 1.4.1.

    Description

      When the client sends a SYST command, the server responds with "215 Cygwin Type: L8". The createFileEntryParser method of the DefaultFTPFileEntryParserFactory class does not have an entry in that block of if statements there to catch and work with Cygwin. I am using a limited set of ftp commands in the project I'm working on, but so far everything seems to work fine when I alias Cygwin to unix. I'm not sure if there are any other complexities around this, or if there is a better way to do this, but I'm sure y'all will know

      Here's what I added:

      FTPClientConfig.java

      In the constant definitions at the beginning of the class starting at line 140, I added the following:

      /**

      • Identifier by which a unix emulation-based ftp server is known throughout
      • the commons-net ftp system.
        */

      public static final String SYST_CYGWIN = "CYGWIN";

      DefaultFTPFileEntryParserFactory.java

      In the first catch block starting at line 85 in the createFileEntryParser method, I added the following to the existing else if statements:

      else if (ukey.indexOf(FTPClientConfig.SYST_CYGWIN) >= 0)

      { parser = createUnixFTPEntryParser(); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            codemonkey codemonkey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: