[
https://issues.apache.org/jira/browse/VFS-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15292857#comment-15292857
]
Florian Kolbe commented on VFS-364:
-----------------------------------
I can confirm that this is still a bug, talking to a Milton WebDAV Server.
The code
{code}
private boolean isCurrentFile(final String href, final URLFileName fileName)
{
String name = hrefString(fileName);
if (href.endsWith("/") && !name.endsWith("/"))
{
name += "/";
}
return href.equals(name) || href.equals(fileName.getPath());
}
{code}
I had the case where in the last line:
# name is the complete URL
# href is the relative URL with a trailing slash, and
# fileName.getPath() returns the relative path *without* the trailing slash
thus the method returns false where it should return true.
> WebdavFileObject.isCurrentFile fails if response.getHref returns just the
> path.
> -------------------------------------------------------------------------------
>
> Key: VFS-364
> URL: https://issues.apache.org/jira/browse/VFS-364
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: OS/X
> Reporter: Ralph Goers
> Assignee: Ralph Goers
> Fix For: 2.1
>
>
> WebdavFileObject checks the returned list of children to exclude the current
> directory from the list of children. This fails with Oracle XML DB as it only
> returns the path and does not include the protocol, host and port.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)