Skip to content

Commit

Permalink
Fix propagation of ignore list changes
Browse files Browse the repository at this point in the history
Previously, when changing the ignore list, those changes would not be
propagated to existing sync folders. Only after restarting the client,
would these changes be applied.

Fixes: #8975
  • Loading branch information
erikjv committed Oct 14, 2021
1 parent b768120 commit 78924bf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
7 changes: 7 additions & 0 deletions changelog/unreleased/9149
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Fix propagation of ignore list changes

Previously, when changing the ignore list, those changes would not be
propagated to existing sync folders. Only after restarting the client,
would these changes be applied.

Fixes: #8975
6 changes: 5 additions & 1 deletion src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1134,8 +1134,12 @@ void Folder::slotScheduleThisFolder()
FolderMan::instance()->scheduleFolder(this);
}

void Folder::slotNextSyncFullLocalDiscovery()
void Folder::slotNextSyncFullLocalDiscovery(bool reloadExcludes)
{
if (reloadExcludes) {
this->reloadExcludes();
}

_timeSinceLastFullLocalDiscovery.invalidate();
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/folder.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ public slots:
void implicitlyHydrateFile(const QString &relativepath);

/** Ensures that the next sync performs a full local discovery. */
void slotNextSyncFullLocalDiscovery();
void slotNextSyncFullLocalDiscovery(bool reloadExcludes = false);

/** Adds the path to the local discovery list
*
Expand Down
2 changes: 1 addition & 1 deletion src/gui/ignorelisteditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void IgnoreListEditor::slotUpdateLocalIgnoreList()
// ignored (because the remote etag did not change) (issue #3172)
for (auto *folder : folderMan->map()) {
folder->journalDb()->forceRemoteDiscoveryNextSync();
folder->slotNextSyncFullLocalDiscovery();
folder->slotNextSyncFullLocalDiscovery(true); // ... but reload the excludes beforehand
folderMan->scheduleFolder(folder);
}
}
Expand Down

0 comments on commit 78924bf

Please sign in to comment.