mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
fix spelling mistakes
This commit is contained in:
parent
fc8440cc01
commit
4f3e167efa
@ -44,18 +44,18 @@ import java.util.concurrent.TimeUnit
|
||||
* @author Abel García de Prada
|
||||
*
|
||||
* @param remotePath Path to append to the URL owned by the client instance.
|
||||
* @param isUserLogged When `true`, the username won't be added at the end of the PROPFIND url since is not
|
||||
* @param isUserLoggedIn When `true`, the username won't be added at the end of the PROPFIND url since is not
|
||||
* needed to check user credentials
|
||||
*/
|
||||
class CheckPathExistenceRemoteOperation(
|
||||
val remotePath: String? = "",
|
||||
val isUserLogged: Boolean
|
||||
val isUserLoggedIn: Boolean
|
||||
) : RemoteOperation<Boolean>() {
|
||||
|
||||
override fun run(client: OwnCloudClient): RemoteOperationResult<Boolean> {
|
||||
return try {
|
||||
val stringUrl =
|
||||
if (isUserLogged) client.baseFilesWebDavUri.toString()
|
||||
if (isUserLoggedIn) client.baseFilesWebDavUri.toString()
|
||||
else client.userFilesWebDavUri.toString() + WebdavUtils.encodePath(remotePath)
|
||||
|
||||
val propFindMethod = PropfindMethod(URL(stringUrl), 0, allPropset).apply {
|
||||
|
@ -33,6 +33,6 @@ class OCFileService(override val client: OwnCloudClient) :
|
||||
override fun checkPathExistence(path: String, isUserLogged: Boolean): RemoteOperationResult<Boolean> =
|
||||
CheckPathExistenceRemoteOperation(
|
||||
remotePath = path,
|
||||
isUserLogged = isUserLogged
|
||||
isUserLoggedIn = isUserLogged
|
||||
).execute(client)
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ class OCServerInfoService : ServerInfoService {
|
||||
): RemoteOperationResult<Boolean> =
|
||||
CheckPathExistenceRemoteOperation(
|
||||
remotePath = path,
|
||||
isUserLogged = true
|
||||
isUserLoggedIn = true
|
||||
).execute(client)
|
||||
|
||||
override fun getRemoteStatus(
|
||||
|
Loading…
x
Reference in New Issue
Block a user