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*.*)";