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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: None
    • Labels:
      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.testcase.patch
          2 kB
          Hoss Man
        2. IO-328.patch
          3 kB
          Marcos Vinícius da Silva

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hossman Hoss Man
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: