Fix unsubscription when renaming an IMAP folder

Fixes #2630
This commit is contained in:
Francis Lachapelle
2014-03-04 21:32:57 -05:00
parent 8bef84bded
commit 02c72fee6a
2 changed files with 5 additions and 4 deletions
+4 -4
View File
@@ -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