From: helge Date: Thu, 3 Aug 2006 00:32:53 +0000 (+0000) Subject: improved subfolder traversal X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=345ebd4c6db318f620b3d979defb6c41becc3c39;p=sope improved subfolder traversal git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1332 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-mime/ChangeLog b/sope-mime/ChangeLog index ed50135c..b57bfb48 100644 --- a/sope-mime/ChangeLog +++ b/sope-mime/ChangeLog @@ -1,3 +1,7 @@ +2006-08-03 Wolfgang Sourdeau + + * NGImap4: improved subfolder handling (v4.5.242) + 2006-07-04 Helge Hess * use %p for pointer formats, fixed gcc 4.1 warnings, use -isNotEmpty diff --git a/sope-mime/NGImap4/ChangeLog b/sope-mime/NGImap4/ChangeLog index f1d86707..f0e3f312 100644 --- a/sope-mime/NGImap4/ChangeLog +++ b/sope-mime/NGImap4/ChangeLog @@ -1,3 +1,8 @@ +2006-08-03 Wolfgang Sourdeau + + * NGImap4Connection.m: check for \noinferiors flags when traversing + subfolders + 2005-12-13 Helge Hess * NGImap4ResponseParser.m: properly decode quoted-printable headers diff --git a/sope-mime/NGImap4/NGImap4Connection.m b/sope-mime/NGImap4/NGImap4Connection.m index 239ec35d..fb2a2c04 100644 --- a/sope-mime/NGImap4/NGImap4Connection.m +++ b/sope-mime/NGImap4/NGImap4Connection.m @@ -270,20 +270,31 @@ NSArray *SOGoMailGetDirectChildren(NSArray *_array, NSString *_fn) { /* Cyrus already tells us whether we need to check for children */ flags = [result objectForKey:folderName]; if ([flags containsObject:@"hasnochildren"]) { - if (debugKeys) - NSLog(@"%s: folder %@ has no children.", __PRETTY_FUNCTION__,folderName); + if (debugKeys) { + [self logWithFormat:@"%s: folder %@ has no children.", + __PRETTY_FUNCTION__,folderName]; + } + return nil; + } + if ([flags containsObject:@"noinferiors"]) { + if (debugKeys) { + [self logWithFormat:@"%s: folder %@ cannot contain children.", + __PRETTY_FUNCTION__,folderName]; + } return nil; } if (debugKeys) { - NSLog(@"%s: all keys %@: %@", __PRETTY_FUNCTION__, folderName, - [[result allKeys] componentsJoinedByString:@", "]); + [self logWithFormat:@"%s: all keys %@: %@", + __PRETTY_FUNCTION__, folderName, + [[result allKeys] componentsJoinedByString:@", "]]; } names = SOGoMailGetDirectChildren([result allKeys], folderName); if (debugKeys) { - NSLog(@"%s: subfolders of '%@': %@", __PRETTY_FUNCTION__, folderName, - [names componentsJoinedByString:@","]); + [self logWithFormat: + @"%s: subfolders of '%@': %@", __PRETTY_FUNCTION__, folderName, + [names componentsJoinedByString:@","]]; } return names; } diff --git a/sope-mime/Version b/sope-mime/Version index e00f09c7..5df6aefa 100644 --- a/sope-mime/Version +++ b/sope-mime/Version @@ -2,7 +2,7 @@ MAJOR_VERSION:=4 MINOR_VERSION:=5 -SUBMINOR_VERSION:=241 +SUBMINOR_VERSION:=242 # v4.5.214 requires libNGExtensions v4.5.146 # v4.2.149 requires libNGStreams v4.2.34