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

FileUtils.listFilesAndDirs includes original dir in results even when it doesn't match filter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.5
    • None
    • None

    Description

      listFilesAndDirs seems to always include the "directory" passed as input in it's resulting Collection. This is unexpected given the docs for the method...

      Finds files within a given directory (and optionally its subdirectories). All files found are filtered by an IOFileFilter.

      • the "given directory" is not a subdirectory of itself
      • it is not subjected to the IOFileFilter dirFilter, it is always added.

      Attachments

        1. IO-328.patch
          3 kB
          Marcos Vinícius da Silva
        2. IO-328.testcase.patch
          2 kB
          Chris M. Hostetter

        Activity

          People

            Unassigned Unassigned
            hossman Chris M. Hostetter
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: