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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2, 1.3, 1.3.1, 1.3.2, 1.4
    • Fix Version/s: 2.0
    • Component/s: Utilities
    • Labels:
      None
    • Environment:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: