1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-06 15:36:45 +00:00

Merge pull request #578 from owncloud/feature/unneccesary_call

[BUG] unneccessary or wrong call ....
This commit is contained in:
Manuel Plazas Palacio 2023-08-23 10:56:22 +02:00 committed by GitHub
commit 2c698cc2a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -54,9 +54,9 @@ class CheckPathExistenceRemoteOperation(
) : RemoteOperation<Boolean>() {
override fun run(client: OwnCloudClient): RemoteOperationResult<Boolean> {
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 {

View File

@ -40,7 +40,7 @@ class OCServerInfoService : ServerInfoService {
): RemoteOperationResult<Boolean> =
CheckPathExistenceRemoteOperation(
remotePath = path,
isUserLoggedIn = true,
isUserLoggedIn = isUserLoggedIn,
).execute(client)
override fun getRemoteStatus(