From 0765c726163c8b1ac255efcf55d3c7f622379994 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 10 Sep 2021 16:59:26 -0400 Subject: [PATCH] fix(mail): replace STATUS by LIST command when copying/moving msgs Fixes #4983 --- SoObjects/Mailer/SOGoMailFolder.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index f7fc8f759..721e7c384 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -687,10 +687,8 @@ static NSComparisonResult _compareFetchResultsByUID (id entry1, id entry2, NSArr if ([destinationAccountName isEqualToString: currentAccountName]) { // We make sure the destination IMAP folder exist, if not, we create it. - result = [[client status: imapDestinationFolder - flags: [NSArray arrayWithObject: @"UIDVALIDITY"]] - objectForKey: @"result"]; - if (![result boolValue]) + result = [[[client list: @"" pattern: imapDestinationFolder] objectForKey: @"list"] objectForKey: imapDestinationFolder]; + if (!result) result = [[self imap4Connection] createMailbox: imapDestinationFolder atURL: [[self mailAccountFolder] imap4URL]]; if (!result || [result boolValue])