From f04edfb8dd2b71217cffd7c41250c8cd1d6aea3c Mon Sep 17 00:00:00 2001 From: Herve Eruam <82284536+herve-er@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:38:51 +0100 Subject: [PATCH] Fix snapshot invalidation issue (sync is not restarting). (#473) * Fix snapshot invalidation issue (sync is not restarting). * Apply PR comment. * Update src/libsyncengine/update_detection/file_system_observer/filesystemobserverworker.cpp --- .../file_system_observer/filesystemobserverworker.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libsyncengine/update_detection/file_system_observer/filesystemobserverworker.cpp b/src/libsyncengine/update_detection/file_system_observer/filesystemobserverworker.cpp index d64247a88..3f1b96faf 100644 --- a/src/libsyncengine/update_detection/file_system_observer/filesystemobserverworker.cpp +++ b/src/libsyncengine/update_detection/file_system_observer/filesystemobserverworker.cpp @@ -30,6 +30,8 @@ FileSystemObserverWorker::FileSystemObserverWorker(std::shared_ptr 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) {