From 7664654e4200aafc803c35f861fa1e8edfdc06fd Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 11 Mar 2009 13:39:20 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 28c05bb78bef144b921bd396d723df3160a6cd68 Monotone-Revision: baff8f841a09a6ce7b85defe87388086513344c4 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-03-11T13:39:20 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ SoObjects/Appointments/SOGoAppointmentFolder.m | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d1edb012..09e4ea276 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-03-11 Ludovic Marcotte + + * SoObjects/Appointments/SOGoAppointmentFolder.m + We now correctly escape caracters that can be + present in the filename prior to initalizing + the NSURL instance. + 2009-03-09 Ludovic Marcotte * Documentation/SOGo Installation Guide.odt diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index f46ed34b5..1aebec649 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -1592,7 +1592,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir for (count = 0; count < max; count++) { - url = [urls objectAtIndex: count]; + url = [NSString stringWithFormat: @"%@/%@", + [[urls objectAtIndex: count] stringByDeletingLastPathComponent], + [[[urls objectAtIndex: count] lastPathComponent] stringByEscapingURL]]; componentURL = [[NSURL URLWithString: url relativeToURL: baseURL] standardizedURL]; componentURLPath = [componentURL absoluteString]; @@ -1600,8 +1602,8 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir != NSNotFound) { urlComponents = [componentURLPath componentsSeparatedByString: @"/"]; - cName = [urlComponents objectAtIndex: [urlComponents count] - 1]; - [cNames setObject: url forKey: cName]; + cName = [[urls objectAtIndex: count] lastPathComponent]; + [cNames setObject: [urls objectAtIndex: count] forKey: cName]; } } @@ -1726,8 +1728,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir buffer = [[NSMutableString alloc] initWithCapacity: max*512]; for (count = 0; count < max; count++) { - currentComponent - = [components objectForKey: [urls objectAtIndex: count]]; + currentComponent = [components objectForKey: [urls objectAtIndex: count]]; if (currentComponent) [self appendObject: currentComponent properties: properties