From 7e4e2863b6622764cd6ac2d0564a124c3821ca3b Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 6 Sep 2017 10:24:18 -0400 Subject: [PATCH] (fix) properly decode IMAP encoded folder names (fixes #4240) --- ActiveSync/SOGoActiveSyncDispatcher.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ActiveSync/SOGoActiveSyncDispatcher.m b/ActiveSync/SOGoActiveSyncDispatcher.m index 8302d7037..44d802e7d 100644 --- a/ActiveSync/SOGoActiveSyncDispatcher.m +++ b/ActiveSync/SOGoActiveSyncDispatcher.m @@ -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"]; }