Skip to content

Commit

Permalink
Fix snapshot invalidation issue (sync is not restarting). (#473)
Browse files Browse the repository at this point in the history
* Fix snapshot invalidation issue (sync is not restarting).

* Apply PR comment.

* Update src/libsyncengine/update_detection/file_system_observer/filesystemobserverworker.cpp
  • Loading branch information
herve-er authored Jan 16, 2025
1 parent 8d7f687 commit f04edfb
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ FileSystemObserverWorker::FileSystemObserverWorker(std::shared_ptr<SyncPal> sync

void FileSystemObserverWorker::invalidateSnapshot() {
if (!_snapshot->isValid()) return;
// The synchronisation will restart, even if there is no change in the file system and if the snapshot is not actually invalidated.
_syncPal->setRestart(true);

_invalidateCounter++;
if (_invalidateCounter < maxRetryBeforeInvalidation) {
Expand Down

0 comments on commit f04edfb

Please sign in to comment.