(fix) handle missing IMAP folders from a hierarchy using EAS

pull/217/head
Ludovic Marcotte 2016-06-30 09:30:22 -04:00
parent 4bfb7ca0bf
commit e29d14de96
2 changed files with 8 additions and 3 deletions

View File

@ -716,6 +716,7 @@ void handle_eas_terminate(int signum)
- (void) _flattenFolders: (NSArray *) theFolders - (void) _flattenFolders: (NSArray *) theFolders
into: (NSMutableArray *) theTarget into: (NSMutableArray *) theTarget
parent: (NSString *) theParent parent: (NSString *) theParent
parentType: (NSString *) theParentType
{ {
NSArray *o; NSArray *o;
int i; int i;
@ -724,13 +725,16 @@ void handle_eas_terminate(int signum)
for (i = 0; i < [theFolders count]; i++) for (i = 0; i < [theFolders count]; i++)
{ {
if (theParent) if (theParent && ![theParentType isEqualToString: @"additional"])
[[theFolders objectAtIndex: i] setObject: theParent forKey: @"parent"]; [[theFolders objectAtIndex: i] setObject: theParent forKey: @"parent"];
if ([theParentType isEqualToString: @"additional"])
[[theFolders objectAtIndex: i] setObject: [[theFolders objectAtIndex: i] objectForKey: @"path"] forKey: @"name"];
o = [[theFolders objectAtIndex: i] objectForKey: @"children"]; o = [[theFolders objectAtIndex: i] objectForKey: @"children"];
if (o) if (o)
[self _flattenFolders: o into: theTarget parent: [[theFolders objectAtIndex: i] objectForKey: @"path"]]; [self _flattenFolders: o into: theTarget parent: [[theFolders objectAtIndex: i] objectForKey: @"path"] parentType: [[theFolders objectAtIndex: i] objectForKey: @"type"]];
} }
} }
@ -804,7 +808,7 @@ void handle_eas_terminate(int signum)
} }
allFoldersMetadata = [NSMutableArray array]; allFoldersMetadata = [NSMutableArray array];
[self _flattenFolders: [accountFolder allFoldersMetadata] into: allFoldersMetadata parent: nil]; [self _flattenFolders: [accountFolder allFoldersMetadata] into: allFoldersMetadata parent: nil parentType: nil];
// Get GUIDs of folder (IMAP) // Get GUIDs of folder (IMAP)
// e.g. {folderINBOX = folder6b93c528176f1151c7260000aef6df92} // e.g. {folderINBOX = folder6b93c528176f1151c7260000aef6df92}

1
NEWS
View File

@ -16,6 +16,7 @@ Bug fixes
- [web] fixed crash when an attachment filename has no extension - [web] fixed crash when an attachment filename has no extension
- [web] fixed selection of transparent all-day events (#3744) - [web] fixed selection of transparent all-day events (#3744)
- [eas] handle base64 EAS protocol version - [eas] handle base64 EAS protocol version
- [eas] handle missing IMAP folders from a hierarchy using EAS
3.1.3 (2016-06-22) 3.1.3 (2016-06-22)
------------------ ------------------