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

FileUtils.listFiles does not list matching files if File parameter is a symbolic link

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0, 2.10.0
    • Fix Version/s: 2.11.0
    • Component/s: Utilities
    • Labels:
      None

      Description

      This is a regression from 2.6.0.  We are using the following FileUtils utility function to list matching files under a directory:

      public static Collection<File> listFiles(File directory, String[] extensions, boolean recursive)

       

      In particular the call we are making is:

      FileUtils.listFiles(extension, new String[]{"jar"}, false);

      This used to return all matching files in 2.6.0 when the directory was a symlink, but it no longer does. Breaking through the code in a debugger, I was able to manually add the FileVisitOptions.FOLLOW_LINKS option, but this is not specifiable from an external caller outside of commons-io.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zachjsh Zach Sherman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: