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

FileUtils.sizeOfDirectoryAsBigInteger can overflow

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Component/s: None
    • Labels:
      None

      Description

      FileUtils.sizeOfDirectoryAsBigInteger can overflow.

      This is because it calls FileUtils.sizeOf(file) which calls sizeOfDirectory() for processing subdirectories.

      As it stands, the method only works properly at the top level.

      A possible solution would be to create private "Big" versions of the called methods; these would not need all the checks so should be faster.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: