Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-585

FilenameUtils#normalizeNoEndSeparator does not sanitize multiple backslashes directly after the colon in windows file paths

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.6
    • 2.10.0
    • None
    • None

    Description

      FilenameUtils#normalizeNoEndSeparator states in the javadoc that :
      "A double slash will be merged to a single slash (but UNC names are handled)."

      It has been observed that if a double backslash occurs after the colon in a windows filepath, then the returned path still contains this double backslash. For example:

      C:\\Program Files\\ExampleDirectory  -->  C:\\Program Files\ExampleDirectory 

      While the expectation is that we should be returning ' C:\Program Files\ExampleDirectory '

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              adammcclenaghan Adam McClenaghan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m