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

getPrefixLength returns wrong length on linux for filename "C:"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.9.0
    • Component/s: None
    • Labels:
      None

      Description

      On most unix filesystems only null byte and / are reserved characters. So its perfectly valid to have a file called "C:".

      If the getPrefixLength method is called for the path of such a file then it returns 2 whereas the expected value is 0.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ichbinkeinreh Patrick Bender
            • 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 - 3h 40m
                3h 40m