From 319c2a94faaf2ea29eb7a6a9ead184ae38c71587 Mon Sep 17 00:00:00 2001 From: joragua Date: Wed, 23 Oct 2024 13:28:18 +0200 Subject: [PATCH] fix: fixed file size after a local update --- .../android/workers/UploadFileFromFileSystemWorker.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/owncloudApp/src/main/java/com/owncloud/android/workers/UploadFileFromFileSystemWorker.kt b/owncloudApp/src/main/java/com/owncloud/android/workers/UploadFileFromFileSystemWorker.kt index c57054bbec4..1edaaa0bc07 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/workers/UploadFileFromFileSystemWorker.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/workers/UploadFileFromFileSystemWorker.kt @@ -250,7 +250,7 @@ class UploadFileFromFileSystemWorker( val result = executeRemoteOperation { uploadFileOperation.execute(client) } - if (result == Unit) { + if (result == Unit && behavior == UploadBehavior.MOVE) { removeLocalFile() // Removed file from tmp folder } } @@ -289,7 +289,7 @@ class UploadFileFromFileSystemWorker( ) // Step 4: Remove tmp file folder after uploading - if (result == Unit) { + if (result == Unit && behavior == UploadBehavior.MOVE) { removeLocalFile() } }