Monotone-Parent: aac65a31ee08c38f3f5267343de6d090bbef6381

Monotone-Revision: 694600692b70cc30ffc96cddeb455dc83bc72078

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-02-04T16:07:29
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau committed 2011-02-04 16:07:29 +00:00
1 parent fefbba1e9b
commit 6e2d8b12b9
2 files changed
+11 -1

No files matched your search

+4
View File
@@ -1,5 +1,9 @@
2011-02-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* 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
+7 -1
View File
@@ -24,6 +24,7 @@
#import <Foundation/NSDictionary.h>
#import <Foundation/NSFileManager.h>
#import <Foundation/NSException.h>
#import <Foundation/NSPropertyList.h>
#import <Foundation/NSString.h>
#import <NGExtensions/NSObject+Logs.h>
@@ -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"];
}