fix(e2ee): sub folder creation#17266
Conversation
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
| private const val INCREMENTER = 1L | ||
|
|
||
| @Suppress("ReturnCount") | ||
| fun getCounter(context: Context, parentFile: OCFile, metadata: Any?): Long { |
There was a problem hiding this comment.
Since same logic needs to be used in CreateFolderOperation.java better to consolidate.
| /** | ||
| * Returns true if the given E2EE version is v2 or newer. | ||
| */ | ||
| fun isV2Plus(context: Context): Boolean { |
There was a problem hiding this comment.
Another helper function directly getting from context.
|
|
||
| if (result.isSuccess()) { | ||
| updateMetadataForE2E(object, e2eData, clientData, e2eFiles, arbitraryDataProvider, encryptionUtilsV2, metadataExists); | ||
| updateMetadataForE2E(object, e2eData, clientData, e2eFiles, arbitraryDataProvider, encryptionUtilsV2, isV1MetadataExists); |
There was a problem hiding this comment.
metadataExists is wrong variable name. This is only used for V1.
| if (metadataExists) { | ||
| if (isV1MetadataExists) { | ||
| // update metadata | ||
| if (E2EVersionHelper.INSTANCE.isV2Plus(version)) { |
There was a problem hiding this comment.
Since isV1MetadataExists only needed for v1 why do we have v2 function in it? @tobiasKaminsky This is for separate PR.
|
APK file: https://github.com/nextcloud/android/actions/runs/28514025082/artifacts/8008586973 |
|
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
|
master-IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/17266-IT-master-13-17 |
Issue
Cannot create encrypted sub folder of sub folder