Simply folder unlock

Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
This commit is contained in:
ZetaTom 2024-04-04 14:55:12 +02:00
parent c4c7773147
commit dc0d87948b
No known key found for this signature in database
GPG Key ID: 3536EB6B4203D957
1 changed files with 7 additions and 11 deletions

View File

@ -756,19 +756,15 @@ public class UploadFileOperation extends SyncOperation {
logResult(result, mFile.getStoragePath(), mFile.getRemotePath());
// Unlock in final block
RemoteOperationResult<Void> unlockFolderResult = null;
if (object instanceof DecryptedFolderMetadataFileV1) {
RemoteOperationResult unlockFolderV1 = EncryptionUtils.unlockFolderV1(parentFile, client, token);
unlockFolderResult = EncryptionUtils.unlockFolderV1(parentFile, client, token);
} else if (object instanceof DecryptedFolderMetadataFile) {
unlockFolderResult = EncryptionUtils.unlockFolder(parentFile, client, token);
}
if (!unlockFolderV1.isSuccess()) {
result = unlockFolderV1;
}
} else {
RemoteOperationResult unlockFolderV2 = EncryptionUtils.unlockFolder(parentFile, client, token);
if (!unlockFolderV2.isSuccess()) {
result = unlockFolderV2;
}
if (unlockFolderResult != null && !unlockFolderResult.isSuccess()) {
result = unlockFolderResult;
}
}