Skip to content

Commit

Permalink
Merge pull request #379 from Infomaniak/KDESKTOP-1351-Allow-users-to-…
Browse files Browse the repository at this point in the history
…stop-the-synchro-during-the-invisible-step-vfs-integrity

Add a check for stopAsked() in VFS status integrity
  • Loading branch information
herve-er authored Nov 26, 2024
2 parents 32554d4 + e42eb30 commit 299a735
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/libsyncengine/syncpal/syncpalworker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ void SyncPalWorker::execute() {
LOG_SYNCPAL_WARN(_logger, "Error in resetVfsFilesStatus for syncDbId=" << _syncPal->syncDbId());
}

// Manage stop
if (stopAsked()) {
// Exit
exitCode = ExitCode::Ok;
setDone(exitCode);
return;
}
if (_syncPal->vfsMode() == VirtualFileMode::Mac) {
// Reset nodes syncing flag
if (!_syncPal->_syncDb->updateNodesSyncing(false)) {
Expand Down Expand Up @@ -536,6 +543,9 @@ bool SyncPalWorker::resetVfsFilesStatus() {
return false;
}
for (; dirIt != std::filesystem::recursive_directory_iterator(); ++dirIt) {
if (stopAsked()) {
return true;
}
#ifdef _WIN32
// skip_permission_denied doesn't work on Windows
try {
Expand Down

0 comments on commit 299a735

Please sign in to comment.