diff --git a/ChangeLog b/ChangeLog index c818c7a58..2cea02fd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2012-02-23 Wolfgang Sourdeau + * OpenChange/MAPIStoreContext.m + (+createRootFolder:withFID:andName:forUser:withRole:): when the + creation of a folder fails in the proper contact, fallback on the + fallback context. + * SoObjects/Mailer/SOGoMailAccount.m (-toManyRelationshipKeysWithNamespaces:): for some reason, we were explicitly returning the drafts folder name in the batch whether diff --git a/OpenChange/MAPIStoreContext.m b/OpenChange/MAPIStoreContext.m index 45f632349..81da9d4c6 100644 --- a/OpenChange/MAPIStoreContext.m +++ b/OpenChange/MAPIStoreContext.m @@ -185,12 +185,16 @@ MAPIStoreLookupContextClassByRole (Class self, enum mapistore_context_role role) contextClass = MAPIStoreFallbackContextK; mapistoreURI = [contextClass createRootSecondaryFolderWithFID: fid - andName: (NSString *) folderName + andName: folderName forUser: userName]; + if (!mapistoreURI && contextClass != MAPIStoreFallbackContextK) + mapistoreURI = [MAPIStoreFallbackContextK createRootSecondaryFolderWithFID: fid + andName: folderName + forUser: userName]; if (mapistoreURI) *mapistoreUriP = mapistoreURI; else - rc = MAPISTORE_ERROR; + rc = MAPISTORE_ERR_NOT_FOUND; return rc; }