Skip to content

Commit 2eb97c0

Browse files
author
Chris Adams
committed
[buteo-sync-plugin-caldav] Continue sync if exception dissociation fails. 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.
1 parent 928075b commit 2eb97c0

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/notebooksyncagent.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,15 +1154,14 @@ bool NotebookSyncAgent::updateIncidences(const QList<Reader::CalendarResource> &
11541154
localBaseIncidence = resource.incidences[parentIndex];
11551155
}
11561156
if (addIncidence(localBaseIncidence)) {
1157-
localBaseIncidence =
1158-
loadIncidence(mStorage, mCalendar, mNotebook->uid(), uid);
1157+
localBaseIncidence = loadIncidence(mStorage, mCalendar, mNotebook->uid(), uid);
11591158
} else {
11601159
localBaseIncidence = KCalCore::Incidence::Ptr();
11611160
}
11621161
}
11631162
if (!localBaseIncidence) {
11641163
LOG_WARNING("Error saving base incidence of resource" << resource.href);
1165-
return false;
1164+
continue; // don't return false and block the entire sync cycle, just ignore this event.
11661165
}
11671166

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

0 commit comments

Comments
 (0)