From d772fe54f51e5de66ef6e0c4d2b158c507e8a74e Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 26 Jun 2023 10:27:19 +0200 Subject: [PATCH] After successful upload update permission to have correct resharing info Signed-off-by: tobiasKaminsky --- .../java/com/owncloud/android/AbstractOnServerIT.java | 1 + .../com/owncloud/android/operations/UploadFileOperation.java | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/androidTest/java/com/owncloud/android/AbstractOnServerIT.java b/app/src/androidTest/java/com/owncloud/android/AbstractOnServerIT.java index 876498ecc601..fd2e206e7f2c 100644 --- a/app/src/androidTest/java/com/owncloud/android/AbstractOnServerIT.java +++ b/app/src/androidTest/java/com/owncloud/android/AbstractOnServerIT.java @@ -234,6 +234,7 @@ public boolean isPowerSavingExclusionAvailable() { getFileByDecryptedRemotePath(parentFolder.getDecryptedRemotePath() + uploadedFileName); assertNotNull(uploadedFile.getRemoteId()); + assertNotNull(uploadedFile.getPermissions()); if (localBehaviour == FileUploader.LOCAL_BEHAVIOUR_COPY || localBehaviour == FileUploader.LOCAL_BEHAVIOUR_MOVE) { diff --git a/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java b/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java index b2d92a156db7..d0ee77afc191 100644 --- a/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java +++ b/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java @@ -1389,6 +1389,7 @@ private void updateOCFile(OCFile file, RemoteFile remoteFile) { file.setModificationTimestampAtLastSyncForData(remoteFile.getModifiedTimestamp()); file.setEtag(remoteFile.getEtag()); file.setRemoteId(remoteFile.getRemoteId()); + file.setPermissions(remoteFile.getPermissions()); } public interface OnRenameListener {