File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -409,6 +409,8 @@ void FolderMetadata::setupVersionFromExistingMetadata(const QByteArray &metadata
409409 _existingMetadataVersion = MetadataVersion::Version1_2;
410410 } else if (versionStringFromMetadata == QStringLiteral (" 2.0" ) || versionStringFromMetadata == QStringLiteral (" 2" )) {
411411 _existingMetadataVersion = MetadataVersion::Version2_0;
412+ } else if (versionStringFromMetadata == QStringLiteral (" 2.1" )) {
413+ _existingMetadataVersion = MetadataVersion::Version2_1;
412414 } else if (versionStringFromMetadata == QStringLiteral (" 1.0" )
413415 || versionStringFromMetadata == QStringLiteral (" 1.1" )) {
414416 // We used to have an intermediate 1.1 after applying a security-vulnerability fix for metadata keys.
@@ -838,6 +840,7 @@ quint64 FolderMetadata::newCounter() const
838840EncryptionStatusEnums::ItemEncryptionStatus FolderMetadata::fromMedataVersionToItemEncryptionStatus (const MetadataVersion metadataVersion)
839841{
840842 switch (metadataVersion) {
843+ case FolderMetadata::MetadataVersion::Version2_1:
841844 case FolderMetadata::MetadataVersion::Version2_0:
842845 return SyncFileItem::EncryptionStatus::EncryptedMigratedV2_0;
843846 case FolderMetadata::MetadataVersion::Version1_2:
Original file line number Diff line number Diff line change @@ -36,14 +36,6 @@ class OWNCLOUDSYNC_EXPORT FolderMetadata : public QObject
3636 QByteArray encryptedMetadataKey;
3737 };
3838
39- // based on api-version and "version" key in metadata JSON
40- enum MetadataVersion {
41- VersionUndefined = -1 ,
42- Version1,
43- Version1_2,
44- Version2_0,
45- };
46-
4739 struct UserWithFileDropEntryAccess {
4840 QString userId;
4941 QByteArray decryptedFiledropKey;
@@ -90,6 +82,16 @@ class OWNCLOUDSYNC_EXPORT FolderMetadata : public QObject
9082 };
9183 Q_ENUM (CertificateType)
9284
85+ // based on api-version and "version" key in metadata JSON
86+ enum class MetadataVersion {
87+ VersionUndefined = -1 ,
88+ Version1,
89+ Version1_2,
90+ Version2_0,
91+ Version2_1,
92+ };
93+ Q_ENUM (MetadataVersion)
94+
9395 FolderMetadata (AccountPtr account, const QString &remoteFolderRoot, FolderType folderType = FolderType::Nested);
9496 /*
9597 * construct metadata based on RootEncryptedFolderInfo
You can’t perform that action at this time.
0 commit comments