Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 92865 invoked from network); 22 Jun 2004 02:30:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Jun 2004 02:30:47 -0000 Received: (qmail 63290 invoked by uid 500); 22 Jun 2004 02:31:04 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 63238 invoked by uid 500); 22 Jun 2004 02:31:03 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 63211 invoked by uid 500); 22 Jun 2004 02:31:02 -0000 Received: (qmail 63190 invoked by uid 99); 22 Jun 2004 02:31:02 -0000 Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Mon, 21 Jun 2004 19:31:02 -0700 Received: (qmail 92821 invoked by uid 1632); 22 Jun 2004 02:30:33 -0000 Date: 22 Jun 2004 02:30:33 -0000 Message-ID: <20040622023033.92820.qmail@minotaur.apache.org> From: scohen@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser UnixFTPEntryParser.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org