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

FileSystemUtils.freeSpaceKb doesn't work with relative paths on Linux

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2, 1.3, 1.3.1, 1.3.2, 1.4
    • 2.0
    • Utilities
    • None
    • Linux

    Description

      Calling FileSystemUtils.freeSpaceKb with ".", "./", "../", "../foo" etc. will result in an empty string being passed to df.
      freeSpaceKb calls FileNameUtils.normalize on the path which destroys relative paths.

      I don't see any need to normalize the path so the fix is simply to remove that call.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cormacb Cormac Blackwell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: