You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Iain Soars (JIRA)" <ji...@apache.org> on 2009/03/19 15:43:50 UTC
[jira] Created: (NET-266) FTPClient.listFiles() corrupts file name
in certain circumstances
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.
[jira] Commented: (NET-266) FTPClient.listFiles() corrupts file
name in certain circumstances
Posted by "Rory Winston (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688165#action_12688165 ]
Rory Winston commented on NET-266:
----------------------------------
This is strange - using the exact pattern that you provided, I get correct results, at least using the Unix FTPEntryParser.
Can you try with the 2.1 snapshot? You'll find it here:
http://people.apache.org/~rwinston/commons-net-2.1-RC/commons-net-ftp-2.1-SNAPSHOT.jar
If that doesnt work, then if you could attach a full command log - I can show you how to do this, if youre not sure (Its in the Commons::Net FAQ).
Thanks Iain.
> 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.
[jira] Issue Comment Edited: (NET-266) FTPClient.listFiles()
corrupts file name in certain circumstances
Posted by "Iain Soars (JIRA)" <ji...@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 edited comment on NET-266 at 3/20/09 8:11 AM:
---------------------------------------------------------
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}
was (Author: soarsi):
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.
[jira] Commented: (NET-266) FTPClient.listFiles() corrupts file
name in certain circumstances
Posted by "Iain Soars (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695350#action_12695350 ]
Iain Soars commented on NET-266:
--------------------------------
OK, using exactly the same code as above but with the 2.1 snapshot I now get the following output:
-rw-rw-rw- 1 user group 5840 Mar 19 09:34 123 456 abc.csv
123 456 abc.csv
user
group
5840
java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/London",offset=0,dstSavings=3600000,useDaylight=true,transitions=242,lastRule=java.util.SimpleTimeZone[id=Europe/London,offset=0,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2009,MONTH=2,WEEK_OF_YEAR=12,WEEK_OF_MONTH=3,DAY_OF_MONTH=19,DAY_OF_YEAR=78,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=9,HOUR_OF_DAY=9,MINUTE=34,SECOND=0,MILLISECOND=0,ZONE_OFFSET=3600000,DST_OFFSET=0]
> 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.
[jira] Issue Comment Edited: (NET-266) FTPClient.listFiles()
corrupts file name in certain circumstances
Posted by "Rory Winston (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688165#action_12688165 ]
Rory Winston edited comment on NET-266 at 3/22/09 1:01 PM:
-----------------------------------------------------------
This is strange - using the exact pattern that you provided, I get correct results, at least using the Unix FTPEntryParser. The difference may be in the fact that you are calling _listFiles()_ on the filename directly, which may be invoking an incorrect parser type based on the system name.
Can you try with the 2.1 snapshot? You'll find it here:
http://people.apache.org/~rwinston/commons-net-2.1-RC/commons-net-ftp-2.1-SNAPSHOT.jar
If that doesnt work, then if you could attach a full command log - I can show you how to do this, if youre not sure (Its in the Commons::Net FAQ).
Thanks Iain.
was (Author: rwinston@eircom.net):
This is strange - using the exact pattern that you provided, I get correct results, at least using the Unix FTPEntryParser.
Can you try with the 2.1 snapshot? You'll find it here:
http://people.apache.org/~rwinston/commons-net-2.1-RC/commons-net-ftp-2.1-SNAPSHOT.jar
If that doesnt work, then if you could attach a full command log - I can show you how to do this, if youre not sure (Its in the Commons::Net FAQ).
Thanks Iain.
> 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.
[jira] Commented: (NET-266) FTPClient.listFiles() corrupts file
name in certain circumstances
Posted by "Rory Winston (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683647#action_12683647 ]
Rory Winston commented on NET-266:
----------------------------------
Hi Iain
Can you give me a full FTP listing? This seems to work for me, however it may be some unlikely combination of group names or other fields which gives this result. For instance:
public void testFilenamesWithEmbeddedNumbers() {
FTPFile f = getParser().parseFTPEntry("-rw-r--r-- 1 root root 111325 Apr 27 2001 123 456 abc.csv");
assertEquals(f.getName(), "123 456 abc.csv");
}
works as expected.
> 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.
[jira] Closed: (NET-266) FTPClient.listFiles() corrupts file name
in certain circumstances
Posted by "Rory Winston (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rory Winston closed NET-266.
----------------------------
Resolution: Fixed
Fix Version/s: 2.1
> 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
> Fix For: 2.1
>
>
> 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.
[jira] Issue Comment Edited: (NET-266) FTPClient.listFiles()
corrupts file name in certain circumstances
Posted by "Rory Winston (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683647#action_12683647 ]
Rory Winston edited comment on NET-266 at 3/19/09 3:12 PM:
-----------------------------------------------------------
Hi Iain
Can you give me a full FTP listing? This seems to work for me, however it may be some unlikely combination of group names or other fields which gives this result. For instance:
{code:java}
public void testFilenamesWithEmbeddedNumbers() {
FTPFile f = getParser().parseFTPEntry("-rw-r--r-- 1 root root 111325 Apr 27 2001 123 456 abc.csv");
assertEquals(f.getName(), "123 456 abc.csv");
}
{code}
works as expected.
was (Author: rwinston@eircom.net):
Hi Iain
Can you give me a full FTP listing? This seems to work for me, however it may be some unlikely combination of group names or other fields which gives this result. For instance:
public void testFilenamesWithEmbeddedNumbers() {
FTPFile f = getParser().parseFTPEntry("-rw-r--r-- 1 root root 111325 Apr 27 2001 123 456 abc.csv");
assertEquals(f.getName(), "123 456 abc.csv");
}
works as expected.
> 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.
[jira] Commented: (NET-266) FTPClient.listFiles() corrupts file
name in certain circumstances
Posted by "Rory Winston (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/NET-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695564#action_12695564 ]
Rory Winston commented on NET-266:
----------------------------------
Iain
thanks for checking this with 2.1. That looks a lot better. Unless there are aby objections, I'm marking as fixed.
> 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
> Fix For: 2.1
>
>
> 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.
[jira] Commented: (NET-266) FTPClient.listFiles() corrupts file
name in certain circumstances
Posted by "Iain Soars (JIRA)" <ji...@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.
[jira] Issue Comment Edited: (NET-266) FTPClient.listFiles()
corrupts file name in certain circumstances
Posted by "Iain Soars (JIRA)" <ji...@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 edited comment on NET-266 at 3/20/09 8:11 AM:
---------------------------------------------------------
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}
was (Author: soarsi):
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.
[jira] Issue Comment Edited: (NET-266) FTPClient.listFiles()
corrupts file name in certain circumstances
Posted by "Iain Soars (JIRA)" <ji...@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 edited comment on NET-266 at 3/20/09 8:11 AM:
---------------------------------------------------------
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}
was (Author: soarsi):
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.