Issue Details (XML | Word | Printable)

Key: NET-184
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Tom Caruso
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Net

FtpClient.listFiles truncates directory name beginning with a number

Created: 14/Feb/08 07:59 PM   Updated: 19/Feb/08 09:30 PM
Return to search
Component/s: None
Affects Version/s: 1.4
Fix Version/s: 2.0

Time Tracking:
Not Specified

Environment: Local is Unix (AIX), remote is Windows

Resolution Date: 19/Feb/08 09:30 PM


 Description  « Hide
I used FtpClient.listFiles() to get a listing of all files in the current working directory on a remote Windows server. If a remote directory begins with a number followed by a space and more text (e.g., 2008 Rates) the name returned by FTPFile.getName() has the leading number truncated (so '2008 Rates' would be 'Rates'). Examining the value returned by FTPFile.toString() or getRawListing() both show the full file name, but the name returned by getName() is truncated.

If the directory begins with a number and is not followed by a space (e.g., 2008_Rates) the correct name is returned by getName(). If there is a number after the test (like'Rates for 2008') the correct name is returned by getName().

Files do not appear to be affected by this. The getName() function returns the correct name regardless of the position of a number or the white space aorund it.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Rory Winston added a comment - 19/Feb/08 09:30 PM
This has been fixed in 2.0.