You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bernd Eckenfels (JIRA)" <ji...@apache.org> on 2016/02/12 18:34:18 UTC

[jira] [Updated] (IO-498) FileUtils.directoryContains(File, File) returns wrong results when the file name contains unreadable characters

     [ https://issues.apache.org/jira/browse/IO-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernd Eckenfels updated IO-498:
-------------------------------
       Priority: Minor  (was: Major)
    Component/s: Utilities

> FileUtils.directoryContains(File, File) returns wrong results when the file name contains unreadable characters
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: IO-498
>                 URL: https://issues.apache.org/jira/browse/IO-498
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.4
>         Environment: linux
>            Reporter: Federico Bonelli
>            Priority: Minor
>
> When testing for FileUtils.directoryContains(File, File) on a file which is in fact contained in the given directory but has odd characters in the name, the method returns wrong results.
> This file:
> {code:title=File name}
> bof@testcorso2015:~/tmp/test$ ls col* | xxd
> 0000000: 636f 6c74 e00a                           colt..
> {code}
> fails to be recognized as belonging to the current directory in this simple snippet of code:
> {code:title=Snippet|borderStyle=solid}
> File[] files = new File(".").listFiles();
> for(File f : files){
>      System.out.println("contains " + f + " = " + FileUtils.directoryContains(new File("."), f));
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)