fix(e2ee): refresh during crud operations#17267
Conversation
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
|
|
||
| parentFolder.setE2eCounter(metadata.metadata.counter) | ||
| val storageManager = FileDataStorageManager(user, context.contentResolver) | ||
| storageManager.saveFile(parentFolder) |
There was a problem hiding this comment.
Should be after serializeAndUploadMetadata
| metadata, | ||
| getStorageManager()); | ||
|
|
||
| parentFile.setE2eCounter(metadata.getMetadata().getCounter()); |
There was a problem hiding this comment.
Should be after serializeAndUploadMetadata
|
|
||
| metadataFile.metadata.files[encryptedFileName] = decryptedFile | ||
| metadataFile.metadata.counter++ | ||
| ocFile.setE2eCounter(metadataFile.metadata.counter) |
There was a problem hiding this comment.
addFileToMetadata has one caller and that already updates counter. No need to double it.
There was a problem hiding this comment.
Also aligns with other functions such as removeFolderFromMetadata
| ): DecryptedFolderMetadataFile { | ||
| metadataFile.metadata.folders[encryptedFileName] = fileName | ||
| metadataFile.metadata.counter++ | ||
| ocFile.setE2eCounter(metadataFile.metadata.counter) |
There was a problem hiding this comment.
addFolderToMetadata has one caller and that already updates counter. No need to double it.
There was a problem hiding this comment.
Also aligns with other functions such as removeFolderFromMetadata
|
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
|
APK file: https://github.com/nextcloud/android/actions/runs/28519645539/artifacts/8011646161 |
|
master-IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/17267-IT-master-14-54 |
Issue
Refreshing folder causing crash during crud operations in encrypted folder. Local counter should be only updated after completion of operation.
Changes
serializeAndUploadMetadata