From 0f87fd4a715b975df7431f41778faaceb17ca7d6 Mon Sep 17 00:00:00 2001 From: alex-z Date: Thu, 25 Apr 2024 00:19:59 +0200 Subject: [PATCH] Bugfix. E2EE. Always migrate from 1.2 to 2.0, even with nested folders. Signed-off-by: alex-z --- src/libsync/foldermetadata.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/libsync/foldermetadata.cpp b/src/libsync/foldermetadata.cpp index 6536e283f439..0340d35669ce 100644 --- a/src/libsync/foldermetadata.cpp +++ b/src/libsync/foldermetadata.cpp @@ -940,15 +940,7 @@ bool FolderMetadata::isRootEncryptedFolder() const bool FolderMetadata::encryptedMetadataNeedUpdate() const { - // TODO: For now we do not migrated to V2 if a folder has subfolders, remove the following code and only leave "return latestSupportedMetadataVersion() > _existingMetadataVersion;" - if (latestSupportedMetadataVersion() <= _existingMetadataVersion) { - return false; - } - - const auto foundNestedFoldersOrIsNestedFolder = !_isRootEncryptedFolder - || std::find_if(std::cbegin(_files), std::cend(_files), [](const auto &file) { return file.isDirectory(); }) != std::cend(_files); - - return !foundNestedFoldersOrIsNestedFolder; + return latestSupportedMetadataVersion() > _existingMetadataVersion; } bool FolderMetadata::moveFromFileDropToFiles()