From ed1b687f91545cfe579eb0b24e290980a44e5c7b Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Sat, 24 Sep 2011 00:10:26 +0000 Subject: [PATCH] Monotone-Parent: e287e19d922a91499f1429d7f16d9bd161d1260e Monotone-Revision: b76df21b12b927a0f3947b610200a0571cb5d9f1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-09-24T00:10:26 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ OpenChange/MAPIStoreMailFolder.m | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) 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