From b4625d017c5685e5e14e1e482fe513ac3c4e145d Mon Sep 17 00:00:00 2001 From: Manuel Plazas Palacio Date: Thu, 24 Aug 2023 12:28:23 +0200 Subject: [PATCH 1/3] Solving bugs when getting file existence. --- .../android/lib/resources/files/RenameRemoteFileOperation.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/RenameRemoteFileOperation.kt b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/RenameRemoteFileOperation.kt index 9a0a4b30..71329a97 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/RenameRemoteFileOperation.kt +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/RenameRemoteFileOperation.kt @@ -106,7 +106,7 @@ class RenameRemoteFileOperation( * @return 'True' if the target path is already used by an existing file. */ private fun targetPathIsUsed(client: OwnCloudClient): Boolean { - val checkPathExistenceRemoteOperation = CheckPathExistenceRemoteOperation(newRemotePath, false) + val checkPathExistenceRemoteOperation = CheckPathExistenceRemoteOperation(newRemotePath, true) val exists = checkPathExistenceRemoteOperation.execute(client) return exists.isSuccess } From 530999848f6efdb43440aa07b94e34be31c89c8f Mon Sep 17 00:00:00 2001 From: Manuel Plazas Palacio Date: Thu, 24 Aug 2023 14:12:30 +0200 Subject: [PATCH 2/3] Solving bugs when getting file existence in OC10 --- .../lib/resources/files/CheckPathExistenceRemoteOperation.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 c9c7289d..b9cf8e87 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,8 +54,7 @@ class CheckPathExistenceRemoteOperation( ) : RemoteOperation() { override fun run(client: OwnCloudClient): RemoteOperationResult { - val baseStringUrl = spaceWebDavUrl ?: if (isUserLoggedIn) client.baseFilesWebDavUri.toString() + WebdavUtils.encodePath(remotePath) - else client.userFilesWebDavUri.toString() + val baseStringUrl = spaceWebDavUrl ?: if (isUserLoggedIn) client.userFilesWebDavUri.toString() else client.baseFilesWebDavUri.toString() val stringUrl = if (isUserLoggedIn) baseStringUrl + WebdavUtils.encodePath(remotePath) else baseStringUrl return try { From c82d75b1d8a987b924c1bdea51fb228a6d134956 Mon Sep 17 00:00:00 2001 From: Aitorbp Date: Wed, 30 Aug 2023 10:16:58 +0100 Subject: [PATCH 3/3] New fix for snackbar when copy without server on --- .../lib/resources/files/CheckPathExistenceRemoteOperation.kt | 1 + 1 file changed, 1 insertion(+) 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 b9cf8e87..a367d0ab 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 @@ -80,6 +80,7 @@ class CheckPathExistenceRemoteOperation( e, "Existence check for $stringUrl : ${result.logMessage}" ) + result.data = false result } }