scohen 2004/06/21 19:30:33 Modified: net/src/java/org/apache/commons/net/ftp/parser UnixFTPEntryParser.java Log: PR: 29689 add support for special file types, those identified in directory listings with a "type" code (first character) of s, S, m, or p. Revision Changes Path 1.17 +8 -3 jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java Index: UnixFTPEntryParser.java =================================================================== RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParser.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- UnixFTPEntryParser.java 22 Apr 2004 03:27:19 -0000 1.16 +++ UnixFTPEntryParser.java 22 Jun 2004 02:30:33 -0000 1.17 @@ -57,7 +57,7 @@ * state) */ private static final String REGEX = - "([bcdlf-])" + "([bcdlfmpSs-])" + "(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\s+" + "(\\d+)\\s+" + "(\\S+)\\s+" @@ -115,6 +115,7 @@ String name = group(25); String endtoken = group(26); + // bcdlfmpSs- switch (typeStr.charAt(0)) { case 'd': @@ -127,8 +128,12 @@ case 'c': isDevice = true; // break; - fall through + case 'f': + case '-': + type = FTPFile.FILE_TYPE; + break; default: - type = FTPFile.FILE_TYPE; + type = FTPFile.UNKNOWN_TYPE; } file.setType(type);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]