You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Paul Heitkemper (JIRA)" <ji...@apache.org> on 2009/10/27 00:37:59 UTC
[jira] Commented: (NET-144) FTP: Filenames containing leading and
trailing spaces
[ https://issues.apache.org/jira/browse/NET-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770293#action_12770293 ]
Paul Heitkemper commented on NET-144:
-------------------------------------
is this not an acceptable patch, or are you looking for a "CVS patch file"?
> FTP: Filenames containing leading and trailing spaces
> -----------------------------------------------------
>
> Key: NET-144
> URL: https://issues.apache.org/jira/browse/NET-144
> Project: Commons Net
> Issue Type: Bug
> Affects Versions: 1.4
> Reporter: Norbert Seekircher
>
> The FTPClient's listFiles() method seems to trim filenames removing leading and trailing spaces.
> E. g.:
> Create a directory "/parent" containing a file " test " (one leading and one trailing space) on an ftp server.
> Then call this code:
> FTPClient ftp = new FTPClient();
> ftp.connect(SERVER_NAME);
> ftp.login(LOGIN, PASS);
>
> FTPFile[] files = ftp.listFiles("/parent");
>
> for (FTPFile file : files) {
> System.out.println("\"" + file.getName() + "\"");
> }
> It will print out "test" instead of " test ".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.