Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[buteo-sync-plugin-caldav] Continue sync if exception dissociation fa…
…ils. Contributes to JB#49261

Previously, the entire sync cycle would have failed.
This commit ensures that we ignore the erroneous exception occurrence
and continue the sync cycle.
  • Loading branch information
Chris Adams committed Mar 11, 2020
1 parent 928075b commit 2eb97c0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/notebooksyncagent.cpp
Expand Up @@ -1154,15 +1154,14 @@ bool NotebookSyncAgent::updateIncidences(const QList<Reader::CalendarResource> &
localBaseIncidence = resource.incidences[parentIndex];
}
if (addIncidence(localBaseIncidence)) {
localBaseIncidence =
loadIncidence(mStorage, mCalendar, mNotebook->uid(), uid);
localBaseIncidence = loadIncidence(mStorage, mCalendar, mNotebook->uid(), uid);
} else {
localBaseIncidence = KCalCore::Incidence::Ptr();
}
}
if (!localBaseIncidence) {
LOG_WARNING("Error saving base incidence of resource" << resource.href);
return false;
continue; // don't return false and block the entire sync cycle, just ignore this event.
}

// update persistent exceptions which are in the remote list.
Expand All @@ -1180,7 +1179,7 @@ bool NotebookSyncAgent::updateIncidences(const QList<Reader::CalendarResource> &
updateIncidence(remoteInstance, localInstance);
} else if (!addException(remoteInstance, localBaseIncidence, parentIndex == -1)) {
LOG_WARNING("Error saving updated persistent occurrence of resource" << resource.href << ":" << remoteInstance->recurrenceId().toString());
return false;
continue; // don't return false and block the entire sync cycle, just ignore this event.
}
}

Expand Down

0 comments on commit 2eb97c0

Please sign in to comment.