Skip to content

Commit

Permalink
(fix) properly decode IMAP encoded folder names (fixes #4240)
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed Sep 6, 2017
1 parent 649337c commit 7e4e286
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ActiveSync/SOGoActiveSyncDispatcher.m
Expand Up @@ -741,14 +741,14 @@ - (void) _flattenFolders: (NSArray *) theFolders
{
[[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"];
}

Expand Down

0 comments on commit 7e4e286

Please sign in to comment.