From 9f6a37e33b82a5635ba73653c1b1a8ee8dee0980 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 18 Jun 2018 11:26:12 +0200 Subject: [PATCH] fix double slash on search results with folder, e.g. "/test//folder//" Signed-off-by: tobiasKaminsky --- src/com/owncloud/android/lib/common/network/WebdavEntry.java | 2 +- .../owncloud/android/lib/common/utils/WebDavFileUtils.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/owncloud/android/lib/common/network/WebdavEntry.java b/src/com/owncloud/android/lib/common/network/WebdavEntry.java index 75a132b66..da1e453aa 100644 --- a/src/com/owncloud/android/lib/common/network/WebdavEntry.java +++ b/src/com/owncloud/android/lib/common/network/WebdavEntry.java @@ -84,7 +84,7 @@ public WebdavEntry(MultiStatusResponse ms, String splitElement) { if (ms.getStatus().length != 0) { mUri = ms.getHref(); - mPath = mUri.split(splitElement, 2)[1]; + mPath = mUri.split(splitElement, 2)[1].replace("//", "/"); int status = ms.getStatus()[0].getStatusCode(); if ( status == CODE_PROP_NOT_FOUND ) { diff --git a/src/com/owncloud/android/lib/common/utils/WebDavFileUtils.java b/src/com/owncloud/android/lib/common/utils/WebDavFileUtils.java index afb8e137a..1e60b698f 100644 --- a/src/com/owncloud/android/lib/common/utils/WebDavFileUtils.java +++ b/src/com/owncloud/android/lib/common/utils/WebDavFileUtils.java @@ -1,4 +1,4 @@ -/** +/* * Nextcloud Android client application * * @author Mario Danic @@ -67,7 +67,7 @@ public ArrayList readData(MultiStatus remoteData, } // loop to update every child - RemoteFile remoteFile = null; + RemoteFile remoteFile; MultiStatusResponse[] responses = remoteData.getResponses(); for (int i = start; i < responses.length; i++) { /// new OCFile instance with the data from the server