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

FTPClient::listFiles() doesn't include files with spaces for AS400

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.9.0
    • None
    • None
    • AS400 ftp server

    Description

      For the FTP server on AS400 I got the different response size for FTPClient::listFiles() and FTPClient::listNames() (first one doesn't include file with spaces)

       

      TheOS400FTPEntryParser pattern is 

      private static final String REGEX =
          "(\\S+)\\s+"                  // user
          + "(?:(\\d+)\\s+)?"           // size, empty for members
          + "(?:(\\S+)\\s+(\\S+)\\s+)?" // date stuff, empty for members
          + "(\\*STMF|\\*DIR|\\*FILE|\\*MEM)\\s+"  // *STMF/*DIR/*FILE/*MEM
          + "(?:(\\S+)\\s*)?";          // file name, missing, when CWD is a *FILE

      and the server response for LIST command

      MYUSER 3 06/12/21 18:31:29 *STMF file with space.txt 

      doesn't match that regex.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dsylaiev Dmytro Sylaiev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: