mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Merge pull request #578 from owncloud/feature/unneccesary_call
[BUG] unneccessary or wrong call ....
This commit is contained in:
commit
2c698cc2a4
@ -54,9 +54,9 @@ class CheckPathExistenceRemoteOperation(
|
|||||||
) : RemoteOperation<Boolean>() {
|
) : RemoteOperation<Boolean>() {
|
||||||
|
|
||||||
override fun run(client: OwnCloudClient): RemoteOperationResult<Boolean> {
|
override fun run(client: OwnCloudClient): RemoteOperationResult<Boolean> {
|
||||||
val baseStringUrl = spaceWebDavUrl ?: if (isUserLoggedIn) client.baseFilesWebDavUri.toString()
|
val baseStringUrl = spaceWebDavUrl ?: if (isUserLoggedIn) client.baseFilesWebDavUri.toString() + WebdavUtils.encodePath(remotePath)
|
||||||
else client.userFilesWebDavUri.toString()
|
else client.userFilesWebDavUri.toString()
|
||||||
val stringUrl = baseStringUrl + WebdavUtils.encodePath(remotePath)
|
val stringUrl = if (isUserLoggedIn) baseStringUrl + WebdavUtils.encodePath(remotePath) else baseStringUrl
|
||||||
|
|
||||||
return try {
|
return try {
|
||||||
val propFindMethod = PropfindMethod(URL(stringUrl), 0, allPropSet).apply {
|
val propFindMethod = PropfindMethod(URL(stringUrl), 0, allPropSet).apply {
|
||||||
|
@ -40,7 +40,7 @@ class OCServerInfoService : ServerInfoService {
|
|||||||
): RemoteOperationResult<Boolean> =
|
): RemoteOperationResult<Boolean> =
|
||||||
CheckPathExistenceRemoteOperation(
|
CheckPathExistenceRemoteOperation(
|
||||||
remotePath = path,
|
remotePath = path,
|
||||||
isUserLoggedIn = true,
|
isUserLoggedIn = isUserLoggedIn,
|
||||||
).execute(client)
|
).execute(client)
|
||||||
|
|
||||||
override fun getRemoteStatus(
|
override fun getRemoteStatus(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user