Skip to content

Commit 71ba246

Browse files
author
Rory Winston
committed
* Update UnixFTPEntryParser parser regex to enable parsing of timestamps with the day preceding the month. Currently the parser can be configured to use this style of timestamp, but the low-level matcher doesn't recognize it.
* Updare OS400FTPEntryParserTest: due to enhancements in UnixFTPEntryParser, some tests that were previously marked as bad now pass. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/net/branches/NET_2_0@757233 13f79535-47bb-0310-9956-ffa450edef68
1 parent 04e55f0 commit 71ba246

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/main/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public class UnixFTPEntryParser extends ConfigurableFTPFileEntryParserImpl
9191
/*
9292
numeric or standard format date
9393
*/
94-
+ "((?:\\d+[-/]\\d+[-/]\\d+)|(?:[a-zA-Z]+\\s+\\S+))\\s+"
94+
+ "((?:\\d+[-/]\\d+[-/]\\d+)|(?:[a-zA-Z0-9]+\\s+\\S+))\\s+"
9595
/*
9696
year (for non-recent standard format)
9797
or time (for numeric or recent standard format

src/test/java/org/apache/commons/net/ftp/parser/OS400FTPEntryParserTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public class OS400FTPEntryParserTest extends CompositeFTPParseTestFramework
4242
"----rwxr-x 1PEP 0 4019 Mar 18 18:58 einladung.zip",
4343
"----rwxr-x 1 PEP 0 xx 422 Mar 24 14:06 readme",
4444
"----rwxr-x 1 PEP 0 8492 Apr 07 30:13 build.xml",
45-
"d---rwxr-x 2 PEP USR 0 45056 Mar 24 14:06 dir1",
4645
"d---rwxr-x 2 PEP 0 45056Mar 24 14:06 zdir2"
4746
}
4847
};

0 commit comments

Comments
 (0)