diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/CheckPathExistenceRemoteOperation.kt b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/CheckPathExistenceRemoteOperation.kt index da9b685f..c9c7289d 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/CheckPathExistenceRemoteOperation.kt +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/CheckPathExistenceRemoteOperation.kt @@ -54,9 +54,9 @@ class CheckPathExistenceRemoteOperation( ) : RemoteOperation() { override fun run(client: OwnCloudClient): RemoteOperationResult { - val baseStringUrl = spaceWebDavUrl ?: if (isUserLoggedIn) client.baseFilesWebDavUri.toString() - else client.userFilesWebDavUri.toString() - val stringUrl = baseStringUrl + WebdavUtils.encodePath(remotePath) + val baseStringUrl = spaceWebDavUrl ?: if (isUserLoggedIn) client.baseFilesWebDavUri.toString() + WebdavUtils.encodePath(remotePath) + else client.userFilesWebDavUri.toString() + val stringUrl = if (isUserLoggedIn) baseStringUrl + WebdavUtils.encodePath(remotePath) else baseStringUrl return try { val propFindMethod = PropfindMethod(URL(stringUrl), 0, allPropSet).apply { diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/status/services/implementation/OCServerInfoService.kt b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/status/services/implementation/OCServerInfoService.kt index 0997f712..56715fcd 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/status/services/implementation/OCServerInfoService.kt +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/status/services/implementation/OCServerInfoService.kt @@ -40,7 +40,7 @@ class OCServerInfoService : ServerInfoService { ): RemoteOperationResult = CheckPathExistenceRemoteOperation( remotePath = path, - isUserLoggedIn = true, + isUserLoggedIn = isUserLoggedIn, ).execute(client) override fun getRemoteStatus(