diff --git a/ChangeLog b/ChangeLog index 2b713323e..4784cbfd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-09-23 Wolfgang Sourdeau + + * OpenChange/MAPIStoreMailFolder.m (-synchroniseCache): renamed + local var "folderWasModified" to "foundChange", as in + MAPIStoreGCSFolder's version. Fixed a bug where "foundChange" + would be reset to NO when deletes were not found, even if new + elements were detected. + 2011-09-23 Francis Lachapelle * UI/PreferencesUI/UIxPreferences.m (-defaultCalendarList, -itemCalendarText, diff --git a/OpenChange/MAPIStoreMailFolder.m b/OpenChange/MAPIStoreMailFolder.m index e208c679c..a9a86fa50 100644 --- a/OpenChange/MAPIStoreMailFolder.m +++ b/OpenChange/MAPIStoreMailFolder.m @@ -481,7 +481,7 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) NSData *changeKey; NSMutableDictionary *currentProperties, *messages, *mapping, *messageEntry; NSCalendarDate *now; - BOOL folderWasModified = NO; + BOOL foundChange = NO; now = [NSCalendarDate date]; [now setTimeZone: utcTZ]; @@ -564,7 +564,7 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) } ldb_transaction_commit([[self context] connectionInfo]->oc_ctx); - folderWasModified = YES; + foundChange = YES; } if (lastModseq) @@ -572,12 +572,12 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) /* FIXME: the problem here is that if a delete is the last operation performed on a folder, the SyncLastSynchronisationDate will continuously get updated until a new modseq shows up */ - folderWasModified = [[(SOGoMailFolder *) sogoObject - fetchUIDsOfVanishedItems: lastModseqNbr] - count] > 0; + foundChange |= [[(SOGoMailFolder *) sogoObject + fetchUIDsOfVanishedItems: lastModseqNbr] + count] > 0; } - if (folderWasModified) + if (foundChange) { ti = [NSNumber numberWithDouble: [now timeIntervalSince1970]]; [currentProperties setObject: ti