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

Niall Pemberton resolved IO-248.
--------------------------------

         Assignee: Niall Pemberton
    Fix Version/s: 2.0
       Resolution: Fixed

Thanks, fixed:

http://svn.apache.org/viewvc?view=revision&revision=1002806

> getFullPathNoEndSeparator return empty while path is one level directory
> ------------------------------------------------------------------------
>
>                 Key: IO-248
>                 URL: https://issues.apache.org/jira/browse/IO-248
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 1.4
>         Environment: linux 2.6.x 32bit java version 1.6.0_20 OpenJDK 
>            Reporter: hippo spark
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: 2.0
>
>
> the getFullPathNoEndSeparator method in FilenameUtils.java (Revision 736890) 
> if filename="/" return "/" <<==right
> if filename="/abc" return empty <<==bug
> if filename="/abc/xyz" return "/abc" <<==right 
> {code}
> 885   int index = indexOfLastSeparator(filename);
> 886   if (index < 0) {
> 887           return filename.substring(0, prefix);
> 888   }
> 889   int end = index + (includeSeparator ? 1 : 0);
> ================
>                 if(end==0) return "/";
> >>>>>>>>>>>>>>>>
> 890   return filename.substring(0, end);
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to