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 a4d04c0cd2db..4ac5c162daaf 100644 --- a/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java +++ b/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java @@ -490,7 +490,7 @@ private RemoteOperationResult encryptedUpload(OwnCloudClient client, OCFile pare // mContext); Object object = EncryptionUtils.downloadFolderMetadata(parentFile, client, mContext, user); - if (object instanceof DecryptedFolderMetadataFileV1 && ((DecryptedFolderMetadataFileV1) object).getMetadata() != null) { + if (object instanceof DecryptedFolderMetadataFileV1 decrypted && decrypted.getMetadata() != null) { metadataExists = true; }