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

FTPClient.listFiles() does not work properly, if remote server speaks German

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 3.0
    • Component/s: FTP
    • Labels:
      None

      Description

      If you are connecting to an FTP server that speaks German you will get German language month names in result to a LIST command. For month names with three-letter abreviations that are identical to the english versions (eg Jan) everything works fine. For month names that are not identical to the englisch versions (eg Dez instead of Dec) you will get FTPFile entrys without date/time information. This is just annoying, but OK.

      You get a real problem in March. The German abreviation is Mär, containing the German umlaut character ä. File entries with a date in March will just be dropped without further notice. I think this should be considered a bug.

      The reason for this behaviour is the REGEX in UnixFTPEntryParser, which matches only to month names containing "normal" letters:

      [a-zA-Z]{3}

      So the month name "Mär" will not match.

      I fixed this by changing this part of REGEX to

      \\D{3}

      In REGEX there are two occurances of the not working part that have to be changed.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jojo1234 Johannes Katelaan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: