[
https://issues.apache.org/jira/browse/NET-707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454828#comment-17454828
]
Gary D. Gregory edited comment on NET-707 at 12/7/21, 8:15 PM:
---------------------------------------------------------------
What version of OS/400 are you running. From my understanding a NAME cannot
contain spaces:
{noformat}
*NAME
The qualifier is a character string that represents a name. The
maximum length of the name is 256 bytes. The first character must be
alphabetic or one of the special characters, $, @, or #. The
remaining characters can be alphanumeric, a period, an underscore,
or one of special characters, $, @, or #. The name can also be a
string of characters starting and ending with double quotation marks
(") or enclosed in parentheses.
{noformat}
was (Author: garydgregory):
What version of OS/400 are you running. From my understanding a NAME cannot
contain spaces:
{quote}*NAME
The qualifier is a character string that represents a name. The
maximum length of the name is 256 bytes. The first character must be
alphabetic or one of the special characters, $, @, or #. The
remaining characters can be alphanumeric, a period, an underscore,
or one of special characters, $, @, or #. The name can also be a
string of characters starting and ending with double quotation marks
(") or enclosed in parentheses. {quote}
> FTPClient::listFiles() doesn't include files with spaces for AS400
> ------------------------------------------------------------------
>
> Key: NET-707
> URL: https://issues.apache.org/jira/browse/NET-707
> Project: Commons Net
> Issue Type: Bug
> Environment: AS400 ftp server
> Reporter: Dmytro Sylaiev
> Priority: Major
>
> 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
> {noformat}
> 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{noformat}
> and the server response for LIST command
> {noformat}
> MYUSER 3 06/12/21 18:31:29 *STMF file with space.txt {noformat}
> doesn't match that regex.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)