From 7f9cd3c3461fd710ea10961236dd72e651487f3e Mon Sep 17 00:00:00 2001 From: helge Date: Tue, 26 Jul 2005 19:10:43 +0000 Subject: [PATCH] fixed a Cocoa issue with mail connection git-svn-id: http://svn.opengroupware.org/SOPE/trunk@939 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-core/NGExtensions/NGCalendarDateRange.m | 1 + sope-mime/ChangeLog | 4 ++++ sope-mime/NGImap4/ChangeLog | 5 +++++ sope-mime/NGImap4/NGImap4Connection.m | 12 ++++++++++-- sope-mime/Version | 2 +- 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/sope-core/NGExtensions/NGCalendarDateRange.m b/sope-core/NGExtensions/NGCalendarDateRange.m index c6b1ce28..3e491fa7 100644 --- a/sope-core/NGExtensions/NGCalendarDateRange.m +++ b/sope-core/NGExtensions/NGCalendarDateRange.m @@ -196,6 +196,7 @@ @end /* NGCalendarDateRange */ + @implementation NSArray(NGCalendarDateRanges) - (NSArray *)arrayByCreatingDateRangesFromObjectsWithStartDateKey:(NSString *)s diff --git a/sope-mime/ChangeLog b/sope-mime/ChangeLog index 177c8e6a..6934267c 100644 --- a/sope-mime/ChangeLog +++ b/sope-mime/ChangeLog @@ -1,3 +1,7 @@ +2005-07-26 Helge Hess + + * NGImap4: fixed a compatibility issue with Cocoa (v4.5.230) + 2005-07-20 Helge Hess * NGMime, NGMail: added some convinience methods to access the header diff --git a/sope-mime/NGImap4/ChangeLog b/sope-mime/NGImap4/ChangeLog index 07a6ffce..50d8c482 100644 --- a/sope-mime/NGImap4/ChangeLog +++ b/sope-mime/NGImap4/ChangeLog @@ -1,3 +1,8 @@ +2005-07-26 Helge Hess + + * NGImap4Connection.m: fixed a Cocoa compatibility issue with + -doesMailboxExistAtURL + 2005-07-15 Helge Hess * NGImap4ResponseParser.m: fixed a bug in parsing mailbox names in ACL diff --git a/sope-mime/NGImap4/NGImap4Connection.m b/sope-mime/NGImap4/NGImap4Connection.m index 1b7078a6..f7a96d8a 100644 --- a/sope-mime/NGImap4/NGImap4Connection.m +++ b/sope-mime/NGImap4/NGImap4Connection.m @@ -719,12 +719,20 @@ NSArray *SOGoMailGetDirectChildren(NSArray *_array, NSString *_fn) { - (BOOL)doesMailboxExistAtURL:(NSURL *)_url { NSString *folderName; id result; - + /* check in hierarchy cache */ if ((result = [self cachedHierarchyResults]) != nil) { + NSString *p; + result = [result objectForKey:@"list"]; - return ([result objectForKey:[_url path]] != nil) ? YES : NO; + p = [_url path]; +#if __APPLE__ + /* normalized results already have the / in front on libFoundation?! */ + if ([p hasPrefix:@"/"]) + p = [p substringFromIndex:1]; +#endif + return ([result objectForKey:p] != nil) ? YES : NO; } /* check using IMAP4 select */ diff --git a/sope-mime/Version b/sope-mime/Version index 6a6dd3ab..ff670ea8 100644 --- a/sope-mime/Version +++ b/sope-mime/Version @@ -2,7 +2,7 @@ MAJOR_VERSION:=4 MINOR_VERSION:=5 -SUBMINOR_VERSION:=229 +SUBMINOR_VERSION:=230 # v4.5.214 requires libNGExtensions v4.5.146 # v4.2.149 requires libNGStreams v4.2.34 -- 2.39.5