1

Resolved

bug: update nonexistent event in Google Calendar

description

I checked out the latest souce code and found this bug.
code in frmMain.cs ( line 887-890):
 
else if (appointmentWasChangedLocally)
{
appointmentsToBeUpdated.Add(appointment.ItemId.ToString());
}
 
You need to check if the appointment exists in Google Calendar. The code goes wrong in such situation:
I delete an event from Google Calendar, and change the corresponding appointment in outlook( modify but not delete it).
And then, I start sync. The modified appointment is put in appointmentsToBeUpdated, and we try to get the corresponding event from Google Calendar at line 1015:
 
EventEntry entry = this._gMobileSync.GetEvent(selfUri); // Exception here because the event does not exist in Google Calendar any more.
 
A simple solution:
comment out line 887-890 and add a 'else' statement after line 910:
 
909: if (entry == null)
910: appointmentsToDelete.Add(appointment.ItemId.ToString());
911: else if (appointmentWasChangedLocally) //2 lines here
912: appointmentsToBeUpdated.Add(appointment.ItemId.ToString());

comments

lifanxi wrote Feb 4, 2009 at 1:03 PM

Hi oylbin,
Thank you for submitting this. 

I have confirmed this issue. It can be reproduced using the steps you described. 

I have merged this fix in to source code repository. Thank you for you effort.

[Change Set]
31022
[Modified Source]
/GMobileSync/frmMain.cs
Regards,
Fanxi

wrote Feb 4, 2009 at 1:04 PM

wrote Feb 13, 2013 at 11:35 PM

wrote May 16, 2013 at 3:03 AM

wrote May 16, 2013 at 3:03 AM

wrote Jun 14, 2013 at 7:21 AM