From 02c72fee6ad0bf8850de88ab65a01191ff351ecc Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 4 Mar 2014 21:32:57 -0500 Subject: [PATCH] Fix unsubscription when renaming an IMAP folder Fixes #2630 --- NEWS | 1 + SoObjects/Mailer/SOGoMailFolder.m | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index a6a080ddf..f060b4cbb 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ Enhancements Bug fixes - fixed an issue with ActiveSync when the number of messages in the mailbox was greater than the window-size specified by the client - fixed sogo-tool operations on Sieve script (#2617) + - fixed unsubscription when renaming an IMAP folder (#2630) 2.2.0 (2014-02-24) ------------------ diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index d83a30917..a649b5f46 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -299,13 +299,13 @@ static NSString *defaultUserID = @"anyone"; toURL: destURL]; if (!error) { - ASSIGN (imap4URL, nil); - ASSIGN (nameInContainer, - ([NSString stringWithFormat: @"folder%@", [newName asCSSIdentifier]])); - // We unsubscribe to the old one, and subscribe back to the new one [client subscribe: [destURL path]]; [client unsubscribe: [imap4URL path]]; + + ASSIGN (imap4URL, nil); + ASSIGN (nameInContainer, + ([NSString stringWithFormat: @"folder%@", [newName asCSSIdentifier]])); } } else