DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=31560>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31560 FTPClient.listFiles method returns null for some files Summary: FTPClient.listFiles method returns null for some files Product: Commons Version: unspecified Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: Net AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] There's problem in regullar expression in class org.apache.commons.net.ftp.parser.UnixFTPEntryParser which causes that files with lastmodified attribute from 0 to 1 a.m. are not listed by ftpclient listFiles method. Example: This file is listed correctly: -rwxrwxrwx 1 owner group 5127 Sep 24 11:44 somefile_tst_200409192_v105_breq.xml For this, listFiles method returns null: -rwxrwxrwx 1 owner group 5127 Sep 20 0:32 somefile_tst_200409192_v101_breq.xml Problem seems to be in: private static final String REGEX = "([bcdlfmpSs-])" + "(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\s+" + "(\\d+)\\s+" + "(\\S+)\\s+" + "(?:(\\S+)\\s+)?" + "(\\d+)\\s+" + MONTHS + "\\s+" + "((?:[0-9])|(?:[0-2][0-9])|(?:3[0-1]))\\s+" + "((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])|(?:[1-9])):([012345]\\d))\\s+" + "(\\S+)(\\s*.*)"; where correct expression should be like this (0 insted of 1): private static final String REGEX = "([bcdlfmpSs-])" + "(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\s+" + "(\\d+)\\s+" + "(\\S+)\\s+" + "(?:(\\S+)\\s+)?" + "(\\d+)\\s+" + MONTHS + "\\s+" + "((?:[0-9])|(?:[0-2][0-9])|(?:3[0-1]))\\s+" + "((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])|(?:[0-9])):([012345]\\d))\\s+" + "(\\S+)(\\s*.*)"; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]