From f6749854a64eb46598d0a233c139783f4587aef0 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 5 Jun 2007 15:45:10 +0000 Subject: [PATCH] Monotone-Parent: c2089bed4b31f45ef9635af961e76d25b48b6c39 Monotone-Revision: f730d4e278c5e0cd1036076335b97d03b2219fc1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-05T15:45:10 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ SoObjects/SOGo/SOGoObject.m | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 571e4010b..415c50a45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-06-05 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoObject.m ([SOGoObject + -_urlPreferringParticle:expectedoverThisOne:possible]): remove the + first 3 elements of the path array if the url returned by + baseURLInContext: returns a hostname. + * SoObjects/Mailer/SOGoMailFolder.m ([SOGoMailFolder -_adjustOwner]): sharedFolderName and otherUsersFolderName may be nil, in which case a crash happens when calling hasPrefix:. diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index 46fffc697..33d660174 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -828,6 +828,12 @@ static BOOL kontactGroupDAV = YES; baseURL = [[self baseURLInContext: context] stringByUnescapingURL]; path = [NSMutableArray arrayWithArray: [baseURL componentsSeparatedByString: @"/"]]; + if ([baseURL hasPrefix: @"http"]) + { + [path removeObjectAtIndex: 2]; + [path removeObjectAtIndex: 1]; + [path removeObjectAtIndex: 0]; + } urlMethod = [path objectAtIndex: 2]; if (![urlMethod isEqualToString: expected]) {