Make sure to add e2ee files to normal blacklist too

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2022-12-20 12:40:42 +01:00
parent 093810f6b9
commit 7d208ec06e
No known key found for this signature in database
GPG key ID: C839200C384636B0

View file

@ -1355,7 +1355,13 @@ void Folder::removeLocalE2eFiles()
qCInfo(lcFolder) << "About to blacklist: " << e2eFoldersToBlacklist;
bool ok = false;
const auto existingBlacklist = _journal.getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
Q_ASSERT(ok);
// Will get deleted from blacklist if encryption is set up again later
const auto expandedBlacklist = existingBlacklist + e2eFoldersToBlacklist;
_journal.setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, expandedBlacklist);
_journal.setSelectiveSyncList(SyncJournalDb::SelectiveSyncE2eFoldersToRemoveFromBlacklist, e2eFoldersToBlacklist);
setSyncPaused(currentSyncPaused);