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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.9.0, 2.10.0
    • 2.11.0
    • Utilities
    • 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

            Unassigned Unassigned
            zachjsh Zach Sherman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: