You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2012/04/26 01:52:16 UTC
[jira] [Created] (IO-328) FileUtils.listFilesAndDirs includes
originla dir in results even when it doesn't match filter
Hoss Man created IO-328:
---------------------------
Summary: FileUtils.listFilesAndDirs includes originla dir in results even when it doesn't match filter
Key: IO-328
URL: https://issues.apache.org/jira/browse/IO-328
Project: Commons IO
Issue Type: Bug
Reporter: Hoss Man
listFilesAndDirs seems to always include the "directory" passed as input in it's resulting Collection. This is unexpected given the docs for the method...
bq. 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (IO-328) FileUtils.listFilesAndDirs includes
original dir in results even when it doesn't match filter
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb updated IO-328:
--------------------
Summary: FileUtils.listFilesAndDirs includes original dir in results even when it doesn't match filter (was: FileUtils.listFilesAndDirs includes originla dir in results even when it doesn't match filter)
> FileUtils.listFilesAndDirs includes original dir in results even when it doesn't match filter
> ---------------------------------------------------------------------------------------------
>
> Key: IO-328
> URL: https://issues.apache.org/jira/browse/IO-328
> Project: Commons IO
> Issue Type: Bug
> Reporter: Hoss Man
> Attachments: IO-328.patch, IO-328.testcase.patch
>
>
> listFilesAndDirs seems to always include the "directory" passed as input in it's resulting Collection. This is unexpected given the docs for the method...
> bq. 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (IO-328) FileUtils.listFilesAndDirs includes
originla dir in results even when it doesn't match filter
Posted by "Marcos VinÃcius da Silva (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcos VinÃcius da Silva updated IO-328:
----------------------------------------
Attachment: IO-328.patch
In this case, I think it makes more sense to not include the given directory, since the user already knows it and it is beeing validated to be a directory at the beginning of the method.
> FileUtils.listFilesAndDirs includes originla dir in results even when it doesn't match filter
> ---------------------------------------------------------------------------------------------
>
> Key: IO-328
> URL: https://issues.apache.org/jira/browse/IO-328
> Project: Commons IO
> Issue Type: Bug
> Reporter: Hoss Man
> Attachments: IO-328.patch, IO-328.testcase.patch
>
>
> listFilesAndDirs seems to always include the "directory" passed as input in it's resulting Collection. This is unexpected given the docs for the method...
> bq. 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (IO-328) FileUtils.listFilesAndDirs includes
originla dir in results even when it doesn't match filter
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated IO-328:
------------------------
Attachment: IO-328.testcase.patch
patch with a testcase demonstrating the core problem
> FileUtils.listFilesAndDirs includes originla dir in results even when it doesn't match filter
> ---------------------------------------------------------------------------------------------
>
> Key: IO-328
> URL: https://issues.apache.org/jira/browse/IO-328
> Project: Commons IO
> Issue Type: Bug
> Reporter: Hoss Man
> Attachments: IO-328.testcase.patch
>
>
> listFilesAndDirs seems to always include the "directory" passed as input in it's resulting Collection. This is unexpected given the docs for the method...
> bq. 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira