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

FilenameUtils.concat fails if second argument (fullFilenameToAdd) starts with '~' (tilde)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.2, 2.5
    • None
    • Utilities
    • None
    • Windows 7 64bit, JavaVM 1.8 32bit

    Description

      FilenameUtils.concat("c:/temp", "~abc.txt") returns "~abc.txt/" instead of "c:/temp/~abc.txt".

      As a result, the file would be created in the user's home directory instead of c:/temp.

      (Note: I Had to replace all instances of double backslashes that would normally appear in the java code with forward slashes as the editor cannot handle backslashes properly.)

      commons io 2.2. and 2.5 behave the same. 2.3 and 2.4 not tested.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jtuemmer Jochen Tümmers
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

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