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

FileUtils.sizeOfDirectoryAsBigInteger can overflow

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4
    • 2.5
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment