Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-184

FtpClient.listFiles truncates directory name beginning with a number

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 2.0
    • None
    • None
    • Local is Unix (AIX), remote is Windows

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ironstar Tom Caruso
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: