[ 
https://issues.apache.org/jira/browse/NET-707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17496234#comment-17496234
 ] 

Dmytro Sylaiev commented on NET-707:
------------------------------------

[~sebb] I got the AS400 env on pub400.com. It's not possible to create file 
with spaces with IBM i env, but when I connect to the same server using SSH it 
supports filename with spaces and with leading spaces as well.

 
{noformat}
ssh [email protected] -p 2222
[email protected]'s password:
Welcome to PUB400!
$ ls
' a1.txt'  file  tempDir
$ pwd
/home/LIMMY
$ uname -a
OS400 WWW 4 7 007800001B91 powerpc Os
$ touch abc\ abc
$ ls
' a1.txt'  'abc abc'  file  tempDir{noformat}

> 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)

Reply via email to