diff --git a/ChangeLog b/ChangeLog index a03f024a2..0a19e3b1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2011-02-04 Wolfgang Sourdeau + * OpenChange/SOGoMAPIFSMessage.m (-MAPISave): use an alternative + way of producing the property list file as, for some reason, + invoking -writeToFile:atomically: can fail on NSDictionary. + * OpenChange/MAPIStoreContext.m (-deleteMessageWithMID:inFID:withFlags:): we need to invoke -cleanupCaches on the related table to avoid listing deleted diff --git a/OpenChange/SOGoMAPIFSMessage.m b/OpenChange/SOGoMAPIFSMessage.m index fa886a67f..3fb7505b4 100644 --- a/OpenChange/SOGoMAPIFSMessage.m +++ b/OpenChange/SOGoMAPIFSMessage.m @@ -24,6 +24,7 @@ #import #import #import +#import #import #import @@ -89,6 +90,7 @@ { NSArray *pathComponents; NSString *filePath; + NSData *content; [self logWithFormat: @"-MAPISave"]; @@ -108,7 +110,11 @@ return; } - if (![properties writeToFile: filePath atomically: YES]) + content = [NSPropertyListSerialization + dataFromPropertyList: properties + format: NSPropertyListOpenStepFormat + errorDescription: NULL]; + if (![content writeToFile: filePath atomically: NO]) [NSException raise: @"MAPIStoreIOException" format: @"could not save message"]; }