From 1f5a2a4c6221e0d06444eeed624a59373b627dba Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 9 May 2014 15:40:57 -0400 Subject: [PATCH] Fixed IMAP copy/move op between subfolder in different accounts --- NEWS | 1 + SoObjects/Mailer/SOGoMailFolder.m | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 2d1eda8aa..4d2454dcc 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,7 @@ Bug fixes - fixed display of images in CSS background (#2437) - fixed limitation of Sieve script size (#2745) - fixed sync-token generation when no change was returned (#2492) + - fixed the IMAP copy/move operation between subfolders in different accounts 2.2.3 (2014-04-03) ------------------ diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index 64088280c..4281d56f5 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -660,8 +660,12 @@ static NSString *defaultUserID = @"anyone"; // Destination folder is in a different account SOGoMailAccounts *accounts; SOGoMailAccount *account; - accounts = [[self container] container]; + SOGoUserFolder *userFolder; + + userFolder = [[context activeUser] homeFolderInContext: context]; + accounts = [userFolder lookupName: @"Mail" inContext: context acquire: NO]; account = [accounts lookupName: [folders objectAtIndex: 1] inContext: localContext acquire: NO]; + if ([account isKindOfClass: [NSException class]]) { result = [NSException exceptionWithHTTPStatus: 500