You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-dev@incubator.apache.org by "Niklas Gustavsson (JIRA)" <ji...@apache.org> on 2006/08/23 14:56:14 UTC

[jira] Commented: (FTPSERVER-42) Listing of non-existing files cause the problems

    [ http://issues.apache.org/jira/browse/FTPSERVER-42?page=comments#action_12430022 ] 
            
Niklas Gustavsson commented on FTPSERVER-42:
--------------------------------------------

The FileZilla server returns 550 for LIST:

ftp> cd test
250 CWD successful. "/test" is current directory.
ftp> dir
200 Port command successful
150 Opening data channel for directory list.
-rw-r--r-- 1 ftp ftp              5 Aug 23 16:54 foo
226 Transfer OK
ftp: 54 bytes received in 0,00Seconds 54000,00Kbytes/sec.
ftp> dir bar
200 Port command successful
550 Directory not found.

Same result on NLST:
ftp> ls
200 Port command successful
150 Opening data channel for directory list.
foo
226 Transfer OK
ftp: 5 bytes received in 0,02Seconds 0,31Kbytes/sec.
ftp> ls bar
200 Port command successful
550 Directory not found

Looks like they do not follow the spec as 550 should not be allowed. 

> 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