You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Joerg Schaible (JIRA)" <ji...@apache.org> on 2013/03/04 17:49:12 UTC

[jira] [Commented] (VFS-467) WebDAV: list children returns parent directory instead of ignoring it

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

Joerg Schaible commented on VFS-467:
------------------------------------

Can you give a reference to support your assumption about the relative paths in WebDAV?
                
> 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