Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KDESKTOP-776 - Fix error cleaning #71

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/libsyncengine/requests/serverrequests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
Loading