From d051e47c886edf300f278d81eefef029a03c3d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cle=CC=81ment=20Kunz?= Date: Tue, 23 Apr 2024 12:12:19 +0200 Subject: [PATCH] KDESKTOP-776 - Fix error cleaning --- src/libsyncengine/requests/serverrequests.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/libsyncengine/requests/serverrequests.cpp b/src/libsyncengine/requests/serverrequests.cpp index 687b3a956..1d27a5952 100644 --- a/src/libsyncengine/requests/serverrequests.cpp +++ b/src/libsyncengine/requests/serverrequests.cpp @@ -1284,7 +1284,6 @@ ExitCode ServerRequests::deleteErrorsForSync(int syncDbId, bool autoResolved) { return ExitCodeDbError; } - bool found = false; for (const Error &error : errorList) { if (isConflictsWithLocalRename(error.conflictType())) { // For conflict type that rename local file @@ -1308,19 +1307,14 @@ ExitCode ServerRequests::deleteErrorsForSync(int syncDbId, bool autoResolved) { return ExitCodeSystemError; } - if (ioError != IoErrorSuccess) { - LOGW_DEBUG(Log::instance()->getLogger(), - "Error in IoHelper::checkIfPathExists: " << Utility::formatIoError(dest, ioError).c_str()); - continue; - } - // If conflict file still exists, keep the error. - if (found) { + if (found || ioError != IoErrorNoSuchFileOrDirectory) { continue; } } if (isAutoResolvedError(error) == autoResolved) { + bool found = false; if (!ParmsDb::instance()->deleteError(error.dbId(), found)) { LOG_WARN(Log::instance()->getLogger(), "Error in ParmsDb::deleteError for dbId=" << error.dbId()); return ExitCodeDbError;