From: helge Date: Thu, 3 Mar 2005 01:29:59 +0000 (+0000) Subject: fixed some incompatibility with MacOSX X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ddea298ca8564487c9d3ecf852d8cd0c65e2ffa;p=scalable-opengroupware.org fixed some incompatibility with MacOSX git-svn-id: http://svn.opengroupware.org/SOGo/trunk@622 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/SoObjects/Mailer/ChangeLog b/SOGo/SoObjects/Mailer/ChangeLog index 7a48020f..2b6d4bf0 100644 --- a/SOGo/SoObjects/Mailer/ChangeLog +++ b/SOGo/SoObjects/Mailer/ChangeLog @@ -1,3 +1,8 @@ +2005-03-03 Helge Hess + + * SOGoMailManager.m: improved compatibility with Cocoa Foundation + (some weird difference in NGImap4 result processing) (v0.9.77) + 2005-02-21 Helge Hess * SOGoMailObject.m: generate proper .ics extension for text/calendar diff --git a/SOGo/SoObjects/Mailer/SOGoMailManager.m b/SOGo/SoObjects/Mailer/SOGoMailManager.m index 27c6cf96..46487787 100644 --- a/SOGo/SoObjects/Mailer/SOGoMailManager.m +++ b/SOGo/SoObjects/Mailer/SOGoMailManager.m @@ -261,7 +261,12 @@ static NSString *imap4Separator = nil; /* one entry is the folder itself, so we need at least two */ return [NSArray array]; +#if __APPLE__ + // TODO: somehow results are different on OSX + prefixlen = [_fn isEqualToString:@""] ? 0 : [_fn length] + 1; +#else prefixlen = [_fn isEqualToString:@"/"] ? 1 : [_fn length] + 1; +#endif ma = [NSMutableArray arrayWithCapacity:count]; for (i = 0; i < count; i++) { NSString *p; @@ -269,7 +274,7 @@ static NSString *imap4Separator = nil; p = [_array objectAtIndex:i]; if ([p length] <= prefixlen) continue; - if (![p hasPrefix:_fn]) + if (prefixlen != 0 && ![p hasPrefix:_fn]) continue; /* cut of common part */ diff --git a/SOGo/SoObjects/Mailer/Version b/SOGo/SoObjects/Mailer/Version index 455e2d01..79481ab8 100644 --- a/SOGo/SoObjects/Mailer/Version +++ b/SOGo/SoObjects/Mailer/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=76 +SUBMINOR_VERSION:=77 # v0.9.69 requires libNGMime v4.5.210 # v0.9.55 requires libNGExtensions v4.5.136