From aef4c87c390675b0e0048fcfb751b9845f260d5d Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 17 Sep 2007 14:20:22 +0000 Subject: [PATCH] Monotone-Parent: eff15e29771ade513bbfeb9c50f15c3845ab5ebe Monotone-Revision: 6c5162d633983a0315c4a43f2114c333d5df86cd Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-17T14:20:22 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/SOGo/SOGoParentFolder.m | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 613a3afc6..72ce783ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-17 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoParentFolder.m ([SOGoParentFolder + -appendPersonalSources]): make sure the value of the "c_path4" of + the returned rows are not NSNull, otherwise, discard them. + 2007-09-16 Wolfgang Sourdeau * SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 37604a352..224fffbaf 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -99,14 +99,15 @@ row = [fc fetchAttributes: attrs withZone: NULL]; while (row) { - folder - = [subFolderClass objectWithName: [row objectForKey: @"c_path4"] - inContainer: self]; key = [row objectForKey: @"c_path4"]; - hasPersonal = (hasPersonal || [key isEqualToString: @"personal"]); - [folder setOCSPath: [NSString stringWithFormat: @"%@/%@", - OCSPath, key]]; - [subFolders setObject: folder forKey: key]; + if ([key isKindOfClass: [NSString class]]) + { + folder = [subFolderClass objectWithName: key inContainer: self]; + hasPersonal = (hasPersonal || [key isEqualToString: @"personal"]); + [folder setOCSPath: [NSString stringWithFormat: @"%@/%@", + OCSPath, key]]; + [subFolders setObject: folder forKey: key]; + } row = [fc fetchAttributes: attrs withZone: NULL]; }