commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Marc Borer (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (VFS-467) WebDAV: list children returns parent directory instead of ignoring it
Date Tue, 05 Mar 2013 07:56:11 GMT

    [ https://issues.apache.org/jira/browse/VFS-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13593207#comment-13593207
] 

Jean-Marc Borer edited comment on VFS-467 at 3/5/13 7:54 AM:
-------------------------------------------------------------

What do you mean by reference? I know that my fix might not cover all cases, that is why I
did not send a patch yet. I have still to write unit tests. 

However what is sure is that the test is wrong: it doesn't compare similar things (relative
against absolute paths). As I had not enough time to study the VFS code, I hoped someone with
a better understanding would react to my proposed solution. It is a simple fix otherwise I
had to touch much more code and potentially break more things.
                
      was (Author: jmborer):
    What do you mean by reference? I know that my fix might not cover all cases, that is why
I did not send a patch yet. I have still to write unit tests. 

However what is sure is that the test is wrong: it doesn't compare similar things (relative
against absolute). As I had not enough time to study the VFS code, I hoped someone with a
better understanding would react to my proposed solution...
                  
> WebDAV: list children returns parent directory instead of ignoring it
> ---------------------------------------------------------------------
>
>                 Key: VFS-467
>                 URL: https://issues.apache.org/jira/browse/VFS-467
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0, 2.1
>            Reporter: Jean-Marc Borer
>
> WebDAV seems to always include the parent folder when returning a list
> of children for a directory. This is due to a wrong test in WebdavFileObject doListChildrenResolved:
> if (isCurrentFile(response.getHref(), name))
> {
>      continue;
> }
> where
> private boolean isCurrentFile(String href, URLFileName fileName)
> {
>    String name = hrefString(fileName);
>    if (href.endsWith("/") && !name.endsWith("/"))
>    { 
>       name += "/"; 
>    }
>    return href.equals(name);
> }
> where the parent dir returned in the WedbDAV response should be ignored. However the
test compares a RELATIVE href (first arg), with an ASBOLUTE href (second arg)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message