Merge pull request #114 from Zentyal/ejhernandez/fix-interleaving-creating-folder
As it happened with dba17fb
if we interleave requests
from different users while creating a folder we can
create the folder in other user's mailbox as latest
activeUser is the one from latest sogo_context_get_root_folder
call.
This is for me a lack of right design and a workaround
only fixing this issue but not the root cause.
pull/65/head
commit
09aed26f10
1
NEWS
1
NEWS
|
@ -6,6 +6,7 @@ Enhancements
|
||||||
- Improve sync speed from Outlook by non-reprocessing already downloaded unread mails
|
- Improve sync speed from Outlook by non-reprocessing already downloaded unread mails
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
|
- Does not create a mail folder in other user's mailbox
|
||||||
- Fix server-side crash with invalid events
|
- Fix server-side crash with invalid events
|
||||||
- Fix setting permissions for a folder with several users
|
- Fix setting permissions for a folder with several users
|
||||||
- Fix reception of calendar event invitations on optional attendees
|
- Fix reception of calendar event invitations on optional attendees
|
||||||
|
|
|
@ -179,6 +179,12 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK;
|
||||||
{
|
{
|
||||||
nameInContainer = [NSString stringWithFormat: @"folder%@",
|
nameInContainer = [NSString stringWithFormat: @"folder%@",
|
||||||
[[folderName stringByEncodingImap4FolderName] asCSSIdentifier]];
|
[[folderName stringByEncodingImap4FolderName] asCSSIdentifier]];
|
||||||
|
|
||||||
|
/* it may be the operation is interleaved with operations
|
||||||
|
from other users having cached information in the thread
|
||||||
|
with the other user, so it'd better activate the user again here... */
|
||||||
|
[[self userContext] activateWithUser: [[[self userContext] woContext] activeUser]];
|
||||||
|
|
||||||
newFolder = [SOGoMailFolderK objectWithName: nameInContainer
|
newFolder = [SOGoMailFolderK objectWithName: nameInContainer
|
||||||
inContainer: sogoObject];
|
inContainer: sogoObject];
|
||||||
if ([newFolder create])
|
if ([newFolder create])
|
||||||
|
|
Loading…
Reference in New Issue