From bf2a6636c1e1149c2d8b7296146f1a15f13bc4c3 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 29 Feb 2012 04:15:42 +0000 Subject: [PATCH] Monotone-Parent: 918d650595c58f2ee59ce861c37907edceb28aa7 Monotone-Revision: 06454d6f51cf228398d63d36b7e74eaac7080cc2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-02-29T04:15:42 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ OpenChange/MAPIStoreMailFolder.m | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 57dd97a78..644f8492e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2012-02-28 Wolfgang Sourdeau + * OpenChange/MAPIStoreMailFolder.m + (-moveCopyMessagesWithMIDs:andCount:fromFolder:withMIDs:andChangeKeys:wantCopy:): + we sync the version cache with the folder in order to update the + target message change keys, which was causing versioning issues + with Outlook 2010. + * OpenChange/gen-property-selectors.py: bannedProps is now an array instead of a dict of "True" values. Added "PrOabContainerGuid" to bannedProps. diff --git a/OpenChange/MAPIStoreMailFolder.m b/OpenChange/MAPIStoreMailFolder.m index 3aefb8931..592674ee5 100644 --- a/OpenChange/MAPIStoreMailFolder.m +++ b/OpenChange/MAPIStoreMailFolder.m @@ -902,7 +902,7 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP) { NGImap4Connection *connection; NGImap4Client *client; - NSString *sourceFolderName, *targetFolderName, *messageURL, *v; + NSString *sourceFolderName, *targetFolderName, *messageURL, *messageKey, *v; NSMutableArray *uids, *oldMessageURLs; NSNumber *uid; NSArray *destUIDs; @@ -910,6 +910,7 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP) NSDictionary *result; NSUInteger count; NSArray *a; + NSData *changeKey; if (![sourceFolder isKindOfClass: [MAPIStoreMailFolder class]]) return [super moveCopyMessagesWithMIDs: srcMids andCount: midCount @@ -989,6 +990,17 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP) [mapping registerURL: messageURL withID: targetMids[count]]; } + /* Update the change keys */ + [self synchroniseCache]; + for (count = 0; count < midCount; count++) + { + changeKey = [NSData dataWithBinary: targetChangeKeys[count]]; + messageKey = [NSString stringWithFormat: @"%@.eml", + [destUIDs objectAtIndex: count]]; + [self setChangeKey: changeKey + forMessageWithKey: messageKey]; + } + [self postNotificationsForMoveCopyMessagesWithMIDs: srcMids andMessageURLs: oldMessageURLs andCount: midCount