(fix) properly decode IMAP encoded folder names (fixes #4240)

pull/218/merge
Ludovic Marcotte 2017-09-06 10:24:18 -04:00
parent 649337c3e5
commit 7e4e2863b6
1 changed files with 2 additions and 2 deletions

View File

@ -741,14 +741,14 @@ void handle_eas_terminate(int signum)
{
[[theFolders objectAtIndex: i] setObject: theExistingParent forKey: @"parent"];
[[theFolders objectAtIndex: i] setObject:
[[[[theFolders objectAtIndex: i] objectForKey: @"path"] substringFromIndex: [theExistingParent length]+1]stringByReplacingOccurrencesOfString:@"/" withString:@"."]
[[[[[theFolders objectAtIndex: i] objectForKey: @"path"] substringFromIndex: [theExistingParent length]+1]stringByReplacingOccurrencesOfString:@"/" withString:@"."] stringByDecodingImap4FolderName]
forKey: @"name"];
}
else if (![[[theFolders objectAtIndex: i] objectForKey: @"type"] isEqualToString: @"otherUsers"] &&
![[[theFolders objectAtIndex: i] objectForKey: @"type"] isEqualToString: @"shared"])
{
[[theFolders objectAtIndex: i] setObject:
[[[theFolders objectAtIndex: i] objectForKey: @"path"] stringByReplacingOccurrencesOfString:@"/" withString:@"."]
[[[[theFolders objectAtIndex: i] objectForKey: @"path"] stringByReplacingOccurrencesOfString:@"/" withString:@"."] stringByDecodingImap4FolderName]
forKey: @"name"];
}