oc-mail: Ensure we are creating folder to the right user
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.
This commit is contained in:
parent
0db16aedb1
commit
82fb03b67b
|
@ -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 a new issue