LIST and NLIST duplicates comparator if implementing your own sorting.
----------------------------------------------------------------------
Key: FTPSERVER-351
URL: https://issues.apache.org/jira/browse/FTPSERVER-351
Project: FtpServer
Issue Type: Bug
Components: Core
Affects Versions: 1.0.3
Reporter: DevNull43
Priority: Critical
LIST and NLIST commands sort Files by name, first directories and then files.
LIST only takes argument -a
NLIST only takes argument -a and -l
Sorting must be done also by SIZE and DATE.
The comparator for sorting files by name is located in
org/apache/ftpserver/filesystem/nativefs/impl/NativeFtpFile.java inside method
listFiles().
This is wrong if we want to overwrite DirectoryListener to add more arguments
for ordering by SIZE or DATE.
NativeFtpFile should not run comparator to avoid running it twice.
The RFC does not require different sorting options, however when number of
files is big, sorting by size of date is a must.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.