Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6D385E251 for ; Tue, 26 Feb 2013 13:58:17 +0000 (UTC) Received: (qmail 93565 invoked by uid 500); 26 Feb 2013 13:58:15 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 93396 invoked by uid 500); 26 Feb 2013 13:58:14 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 92968 invoked by uid 99); 26 Feb 2013 13:58:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2013 13:58:13 +0000 Date: Tue, 26 Feb 2013 13:58:13 +0000 (UTC) From: "Jean-Marc Borer (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (VFS-467) WebDAV: list children returns parent directory instead of ignoring it MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/VFS-467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jean-Marc Borer updated VFS-467: -------------------------------- Description: 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) was: 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); 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) > 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