From b333310ffe12568b5136c2280e9b377f1d7f830a Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 20 Dec 2022 18:29:24 +0100 Subject: [PATCH] Clean up sync termination and restart procedure after file blacklisting done Signed-off-by: Claudio Cambra --- src/gui/folder.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 755f4c219..60750e4d1 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -1372,9 +1372,6 @@ void Folder::removeLocalE2eFiles() return; } - const auto currentSyncPaused = syncPaused(); - setSyncPaused(true); - qCInfo(lcFolder) << "About to blacklist: " << e2eFoldersToBlacklist; bool ok = false; @@ -1386,13 +1383,16 @@ void Folder::removeLocalE2eFiles() _journal.setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, expandedBlacklist); _journal.setSelectiveSyncList(SyncJournalDb::SelectiveSyncE2eFoldersToRemoveFromBlacklist, e2eFoldersToBlacklist); - setSyncPaused(currentSyncPaused); + if(isBusy()) { + slotTerminateSync(); + } for (const auto &path : qAsConst(e2eFoldersToBlacklist)) { _journal.schedulePathForRemoteDiscovery(path); + schedulePathForLocalDiscovery(path); } - scheduleThisFolderSoon(); + slotScheduleThisFolder(); } QString Folder::fileFromLocalPath(const QString &localPath) const -- 2.30.2