Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 93434 invoked from network); 20 Mar 2009 15:11:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Mar 2009 15:11:12 -0000 Received: (qmail 14524 invoked by uid 500); 20 Mar 2009 15:11:11 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 14462 invoked by uid 500); 20 Mar 2009 15:11:11 -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 14451 invoked by uid 99); 20 Mar 2009 15:11:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2009 08:11:11 -0700 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, 20 Mar 2009 15:11:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B0D05234C045 for ; Fri, 20 Mar 2009 08:10:50 -0700 (PDT) Message-ID: <807963918.1237561850722.JavaMail.jira@brutus> Date: Fri, 20 Mar 2009 08:10:50 -0700 (PDT) From: "Iain Soars (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (NET-266) FTPClient.listFiles() corrupts file name in certain circumstances In-Reply-To: <897301066.1237473830451.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/NET-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683904#action_12683904 ] Iain Soars commented on NET-266: -------------------------------- The parsing of the raw listing seems to be a bit odd. This code: {code:java} FTPFile[] files = ftp.listFiles("123 456 abc.csv"); for (FTPFile file : files) { System.out.println(file.getRawListing()); System.out.println(file.getName()); System.out.println(file.getUser()); System.out.println(file.getGroup()); System.out.println(file.getSize()); System.out.println(file.getTimestamp()); } {code} produces this output: {code} -rw-rw-rw- 1 user group 5840 Mar 19 09:34 123 456 abc.csv abc.csv user group 5840 Mar 19 null {code} > FTPClient.listFiles() corrupts file name in certain circumstances > ----------------------------------------------------------------- > > Key: NET-266 > URL: https://issues.apache.org/jira/browse/NET-266 > Project: Commons Net > Issue Type: Bug > Affects Versions: 2.0 > Environment: Windows Vista client running JDK 1.6.0_12 > FTP server on Solaris 10 > Reporter: Iain Soars > Priority: Minor > > A directory on the FTP server contains the following files: > abc def ghi.csv > 123 abc ghi.csv > 123 abc 456.csv > 123 456 abc.csv > When calling FTPClient.listFiles on the above directory the filenames returned in the FTPFile[] are as follows: > abc def ghi.csv > 123 abc ghi.csv > 123 abc 456.csv > abc.csv > As this shows, the filename 123 456 abc.csv is being truncated and returned as abc.csv. This appears to be the case for all filenames that follow a pattern of 'number group' 'space' 'number group' 'space' 'character group' -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.