Monotone-Parent: 85e37dbc7e87a173193494e6234f460788904318

Monotone-Revision: 107e4e5ebd41e916769f1be7ce070d725d255f0d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-15T15:24:42
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2012-08-15 15:24:42 +00:00
parent 47afdfcd40
commit ab001192d6
2 changed files with 7 additions and 3 deletions

View File

@@ -113,6 +113,7 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK;
NSString *newDisplayName;
NSMutableDictionary *propsCopy;
NSNumber *key;
uint64_t fid;
key = MAPIPropertyKey (PR_DISPLAY_NAME_UNICODE);
newDisplayName = [newProperties objectForKey: key];
@@ -121,10 +122,11 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK;
&& ![[(SOGoMailFolder *) sogoObject displayName]
isEqualToString: newDisplayName])
{
[NSException raise: @"MAPIStoreIOException"
format: @"renaming a mail folder via OpenChange is"
@" currently a bad idea"];
fid = [self objectId];
[(SOGoMailFolder *) sogoObject renameTo: newDisplayName];
[[self mapping] updateID: fid withURL: [self url]];
[self cleanupCaches];
propsCopy = [newProperties mutableCopy];
[propsCopy removeObjectForKey: key];
[propsCopy autorelease];