-
-
Notifications
You must be signed in to change notification settings - Fork 100
Description
When trying to synchronize Outlook events to Nextcloud via CalDavSynchronizer, one event caused this error which always pops up after every synchronization attempt.
The issue occurs within the AddMasterEvent(IICalendar calendar) method in the CalDavSynchronizer.Implementation.Events.EventEntityManager class. I would suggest that it's the following part of the code which causes this error, since it's the only division I was able to find directly within the AddMasterEvent method:
var intervalInDays = GreatestCommonDivisor(sortedExceptionsWithDistance.Select(d => d.DistanceFromMasterInDays));
var numberOfEceptions = sortedExceptionsWithDistance.Last().DistanceFromMasterInDays / intervalInDays + 1;
It seems like it's possible that intervalInDays + 1 is equal to zero, causing a System.DevideByZeroException.
Implementing handling for this problem would be greatly appreciated, as the only way I found to fix the error popup during synchronization is to fully remove the event.