Monotone-Parent: 63e89008bf0aa0171f79d7bf4570993b929c7c0d

Monotone-Revision: abbedeb3c6a9b4649d47fc35a90f1a0d3fe244c5

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-01-06T03:20:24
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2011-01-06 03:20:24 +00:00
parent 12e392452c
commit 0a3c63f76e
4 changed files with 14 additions and 3 deletions

View File

@ -1,5 +1,13 @@
2011-01-05 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/SOGoMAPIFSMessage.m (-MAPISave): make use of
"ensureDirectory" on the container folder to avoid errors with
NSDictionary failing to save itself to the filesystem.
* OpenChange/SOGoMAPIFSFolder.m (-ensureDirectory): method made
public and which ensures that the directory pointed to by the
instances of this class does exist.
* OpenChange/SOGoContactGCSEntry+MAPIStore.m (-setMAPIProperties):
take "PidLidEmail1EmailAddress" id as key for the contact email
address.

View File

@ -43,6 +43,7 @@
- (NSString *) directory;
- (SOGoMAPIFSMessage *) newMessage;
- (void) ensureDirectory;
@end

View File

@ -133,7 +133,7 @@ static NSString *privateDir = nil;
return [SOGoMAPIFSMessage objectWithName: filename inContainer: self];
}
- (void) _ensureDirectorySanity
- (void) ensureDirectory
{
NSFileManager *fm;
NSDictionary *attributes;
@ -169,7 +169,7 @@ static NSString *privateDir = nil;
BOOL isDir;
if (!directoryIsSane)
[self _ensureDirectorySanity];
[self ensureDirectory];
fm = [NSFileManager defaultManager];
contents = [fm directoryContentsAtPath: directory];
@ -208,7 +208,7 @@ static NSString *privateDir = nil;
BOOL isDir;
if (!directoryIsSane)
[self _ensureDirectorySanity];
[self ensureDirectory];
fm = [NSFileManager defaultManager];
fullName = [directory stringByAppendingPathComponent: fileName];

View File

@ -74,6 +74,8 @@
[self logWithFormat: @"-MAPISave"];
[container ensureDirectory];
filePath = [[container directory]
stringByAppendingPathComponent: nameInContainer];
if (![properties writeToFile: filePath atomically: YES])