[ http://issues.apache.org/jira/browse/FTPSERVER-42?page=comments#action_12438827 ] Clinton Foster commented on FTPSERVER-42: -----------------------------------------
To state the problem in another way, if the filepath argument for either LIST or NLST is a non-existent file or directory, a 501 error is returned. Thereafter, the conversation with the server is out of sync, and sending any command to the server causes strange results. Here is a sample debug client session: ftp> ls nosuch ---> EPSV 229 Entering Passive Mode (|||55501|) ---> EPRT |2|::1|55503| 200 Command EPRT okay. ---> LIST nosuch 150 File status okay; about to open data connection. 501 Syntax error in parameters or arguments. ftp> pwd ---> PWD 226 Closing data connection. ftp> pwd ---> PWD 257 "/" is current directory. ftp> ls ---> EPRT |2|::1|55505| 257 "/" is current directory. ---> LIST 200 Command EPRT okay. > Listing of non-existing files cause the problems > ------------------------------------------------ > > Key: FTPSERVER-42 > URL: http://issues.apache.org/jira/browse/FTPSERVER-42 > Project: FtpServer > Issue Type: Bug > Reporter: Evgueni Smoliar > Attachments: patch1.txt, patch2.txt > > > list of non-existing files cause connection problems in stead of just > returing empty result list > File Not exists is not syntax error! > org.apache.ftpserver.DirectoryLister.java > ---- > all calls like : > try { > files = m_fileSystemView.listFiles(m_file); > } > catch(FtpException ex) { > } > if(files == null) { > return false; > } > should be changed to : > try { > files = m_fileSystemView.listFiles(m_file); > } > catch(FtpException ex) { > } > if(files == null) { > return true; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
