[ https://issues.apache.org/jira/browse/NET-454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231820#comment-13231820 ]
Sebb commented on NET-454: -------------------------- What happens if you try: {code} client.listFiles("78/1295213/0/476312ca9c653ffc6cc8fb6e1649dae6/"); {code} I tried setting up an identical test, and everything works OK for me: {code} set classpath=commons-net-examples-3.1.jar;commons-net-3.1.jar java examples/ftp/FTPClientExample -l host user password "78/1295213/0/476312ca9c653ffc6cc8fb6e1649dae6/ModComp PO # 1054.pdf" ... 215 UNIX Type: Apache FtpServer Remote system is UNIX Type: Apache FtpServer PASV 227 Entering Passive Mode (127,0,0,1,18,81) LIST 78/1295213/0/476312ca9c653ffc6cc8fb6e1649dae6/ModComp PO # 1054.pdf 150 File status okay; about to open data connection. 226 Closing data connection. -rw------- 1 user group 0 Mar 17 02:47 ModComp PO # 1054.pdf -rw------- 1 group user 0 2012-03-17 02:47:00 GMT ModComp PO # 1054.pdf NOOP 200 Command NOOP okay. QUIT 221 Goodbye. {code} > paths with spaces result in inaccurate file information > ------------------------------------------------------- > > Key: NET-454 > URL: https://issues.apache.org/jira/browse/NET-454 > Project: Commons Net > Issue Type: Bug > Components: FTP > Affects Versions: 3.0.1, 3.1 > Environment: Mac OS X 10.7.3, FTP server is Pure-FTPd on Linux CentOS > 5 > Reporter: Shane Witbeck > Labels: ftp, path > > Calling FTPClient.listFiles(String pathname) results in an inaccurate file > list being returned. The following test illustrates the issue: > {code:java} > @Test > public void remoteListFilesFailure() throws Exception { > FTPClient client = new FTPClient(); > client.connect(REMOTE_SERVER); > client.enterLocalPassiveMode(); > client.login(REMOTE_USERNAME, REMOTE_PASSWORD); > client.setFileType(FTP.BINARY_FILE_TYPE); > int reply = client.getReplyCode(); > if (!FTPReply.isPositiveCompletion(reply)) { > client.disconnect(); > log.error("FTP server refused connection. reply=" + reply); > } > FTPFile[] rootFiles = > client.listFiles("78/1295213/0/476312ca9c653ffc6cc8fb6e1649dae6/ModComp PO # > 1054.pdf"); > Assert.assertEquals(1, rootFiles.length); // <-- fails with > rootFiles.length = 0 > } > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira