From 93d0b07adba1e933b7fb01bfd71f0bc0891fba19 Mon Sep 17 00:00:00 2001 From: Greg Allen Date: Thu, 7 Jul 2016 22:37:19 -0400 Subject: [PATCH] Make a real URI for comparison with the parent URI. --- .../src/main/java/org/bedework/util/dav/DavUtil.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bw-util-dav/src/main/java/org/bedework/util/dav/DavUtil.java b/bw-util-dav/src/main/java/org/bedework/util/dav/DavUtil.java index 5fc9f131..b4bf73ed 100644 --- a/bw-util-dav/src/main/java/org/bedework/util/dav/DavUtil.java +++ b/bw-util-dav/src/main/java/org/bedework/util/dav/DavUtil.java @@ -816,12 +816,13 @@ public Collection processResponses(final Collection responses DavChild dc = makeDavResponse(resp); - /* We get the collection back as well - check for it and skip it. */ - URI childURI = new URI(dc.uri); + if (parentURI != null) { + /* We get the collection back as well - check for it and skip it. */ + URI childURI = new URI("http", "localhost", dc.uri, null); - if ((parentURI != null) && - parentURI.getPath().equals(childURI.getPath())) { - continue; + if (parentURI.getPath().equals(childURI.getPath())) { + continue; + } } result.add(dc);