Fix unsubscription when renaming an IMAP folder

Fixes #2630
pull/20/head
Francis Lachapelle 2014-03-04 21:32:57 -05:00
parent 8bef84bded
commit 02c72fee6a
2 changed files with 5 additions and 4 deletions

1
NEWS
View File

@ -7,6 +7,7 @@ Enhancements
Bug fixes 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 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 sogo-tool operations on Sieve script (#2617)
- fixed unsubscription when renaming an IMAP folder (#2630)
2.2.0 (2014-02-24) 2.2.0 (2014-02-24)
------------------ ------------------

View File

@ -299,13 +299,13 @@ static NSString *defaultUserID = @"anyone";
toURL: destURL]; toURL: destURL];
if (!error) 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 // We unsubscribe to the old one, and subscribe back to the new one
[client subscribe: [destURL path]]; [client subscribe: [destURL path]];
[client unsubscribe: [imap4URL path]]; [client unsubscribe: [imap4URL path]];
ASSIGN (imap4URL, nil);
ASSIGN (nameInContainer,
([NSString stringWithFormat: @"folder%@", [newName asCSSIdentifier]]));
} }
} }
else else