[
https://issues.apache.org/jira/browse/NET-349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sebb resolved NET-349.
----------------------
Resolution: Won't Fix
Impossible to fix this in general.
For example, the following listing appears to show 3 files:
{noformat}
drwxrwxr-x 2 user user 4 Oct 5 18:39 .
drwx--x--x 35 user user 174 Oct 5 18:28 ..
-rw-rw-r-- 1 user user 1 Oct 5 18:35 test1.txt
-rw-rw-r-- 1 user user 1 Oct 5 18:38 test2.txt
-rw-rw-r-- 1 user user 1 Oct 5 18:35 test3.txt
{noformat}
However, in fact there are only 2, as there is an NL in the name after
'test2.txt'.
> FTPClient.listFiles() returns a file entry containing a new line character
> only up to the new line character
> ------------------------------------------------------------------------------------------------------------
>
> Key: NET-349
> URL: https://issues.apache.org/jira/browse/NET-349
> Project: Commons Net
> Issue Type: Bug
> Components: FTP
> Affects Versions: 2.2
> Environment: Linux localhost 2.6.9-22.ELsmp #1 SMP Mon Sep 19
> 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux
> RedHat Enterprise Linux
> Reporter: Max
> Priority: Minor
>
> Create 3 files
> File with new lines:
> echo > 'test
> line1
> line2
> line3.txt'
> 2 files without:
> echo > test1
> echo > testz
> connect via ftpclient to the server containing these files, switch to that
> directory and call listFiles().
> The file with new lines will return as test and trailing components of the
> path will be missing.
> FTPFileEntryParserImpl.readNextEntry() is using BufferedReader.readLine() to
> identify the end of the entry. May be some other approach is needed to
> identify the end of the entry, since file names with new lines although
> undesired, are actually valid in unix environments.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira