From 86805369a35b99b711cbe05592472f6410645c9c Mon Sep 17 00:00:00 2001 From: smizrahi Date: Tue, 3 Jan 2023 15:24:30 +0100 Subject: [PATCH] fix(calendar): Fix inaccessibility to personal calendar on Mac OS X Ventura. Fixes #5639 --- SoObjects/Appointments/SOGoAppointmentFolder.m | 9 ++++++++- SoObjects/SOGo/SOGoGCSFolder.m | 13 ++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 1a36ce16f..3eb4153fb 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -2594,8 +2594,15 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir - (NSException *) setDavDescription: (NSString *) description { if (description) { + // FIXME: Improve MacOSX Ventura support + // Check if the problem will be fixed by Apple or if this fix should be kept in the future + // Ticket #5639 + if ([[context request] isMacOSXVenturaCalendarApp]) { + description = [description stringByReplacingOccurrencesOfString:@"/Personal" withString:@"/personal"]; + } + [self setFolderPropertyValue: description - inCategory: @"DavDescription"]; + inCategory: @"DavDescription"]; } return nil; diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 8e0ced2ee..3071e3c62 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -460,10 +460,21 @@ static NSArray *childRecordFields = nil; - (NSString *) folderReference { + NSString *realNameInContainer; + + realNameInContainer = [self realNameInContainer]; + + // FIXME: Improve MacOSX Ventura support + // Check if the problem will be fixed by Apple or if this fix should be kept in the future + // Ticket #5639 + if ([[context request] isMacOSXVenturaCalendarApp]) { + realNameInContainer = [realNameInContainer stringByReplacingOccurrencesOfString:@"Personal" withString:@"personal"]; + } + return [NSString stringWithFormat: @"%@:%@/%@", owner, [container nameInContainer], - [self realNameInContainer]]; + realNameInContainer]; } - (NSArray *) pathArrayToFolder