Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 93520 invoked from network); 29 Feb 2008 19:06:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Feb 2008 19:06:04 -0000 Received: (qmail 40005 invoked by uid 500); 29 Feb 2008 19:05:58 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 39929 invoked by uid 500); 29 Feb 2008 19:05:58 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 39920 invoked by uid 99); 29 Feb 2008 19:05:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Feb 2008 11:05:58 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Feb 2008 19:05:09 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 372FC234C066 for ; Fri, 29 Feb 2008 11:04:51 -0800 (PST) Message-ID: <1995288606.1204311891224.JavaMail.jira@brutus> Date: Fri, 29 Feb 2008 11:04:51 -0800 (PST) From: "Wolfgang Pasche (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (NET-190) [FTP Client] Not listing files with 'invalid' date In-Reply-To: <1636568701.1204290652923.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/NET-190?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1257390= 3#action_12573903 ]=20 Wolfgang Pasche commented on NET-190: ------------------------------------- I just entered to submit the same issue. In my opinion, the solution must b= e to add the year field before the first parse, instead of doing this after= successful parsing (which is done now). The reason for this problem is the= stupid behaviour of all unix systems, to omit the year, when displaying da= tes in the "nearest" past (I don't know the limit). Unfortunately even the = ftp servers do the same. It would be very nice, if someone could fix this issue shortly, because we = programmed a JobScheduler on base of commons.net, and so at the moment this= program is not able to get any file from a directory containing a file fro= m Feb 29 because of the null elements in the FtpFile array (okay, this coul= d be fixed by skipping the nulls, but of course we need also to get the fil= es from this date). Thanks in advance W. Pasche, Sabre Travel Networks > [FTP Client] Not listing files with 'invalid' date > -------------------------------------------------- > > Key: NET-190 > URL: https://issues.apache.org/jira/browse/NET-190 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Environment: FTP Gateway: Response:=09331-httpiproxy2 FTP server = (Version 1.9.2.4 - 2005/01/11 13:03:28) ready. > FTP Server: Response:=09215 UNIX Type: L8 > FTP Client: Jakarta Commons VFS over Jakarta Commons NET > Reporter: Diego Souto > Original Estimate: 3h > Remaining Estimate: 3h > > When trying to list files in a FTP directory with two files returns 0 Fil= eObjects. > With another FTP client.... response is: > ftp> ls > 227 Entering Passive Mode (212,163,35,155,160,40) > 150 Conexi=C3=B3n de datos aceptada > -rw-r--r-- 1 0 0 222 Feb 29 09:47 AYC01R > -rw-r--r-- 1 0 0 688 Feb 29 03:04 AYC02R > 226-Options: -l=20 > 226 2 ocurrencias en total > ... so there are two files with date "FEBRUARY 29" (2008 is a leap year) > When listing files with Jakarta Commons VFS over Jakarta Commons NET it r= eturns 0 files. > I revised Commons Net source and I found in 'org.apache.commons.net.ftp.p= arser.UnixFTPEntryParser' the following code: > try > { > file.setTimestamp(super.parseTimestamp(datestr)); > } > catch (ParseException e) > { > =09return null; // this is a parsing failure too. > } > So I guess maybe the timestamp parser is throwing a ParseException (perha= ps it's guessing a incorrect year) and in this case is returning NULL so th= e calling class is ignoring these files with 'Feb 29' date. > I think this behaviour is incorrect and must be fixed. If date is conside= red invalid it would throw an exception,... not simply ignore the file. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.