(fix) fixed Apple Calendar creation (fixes #4813)

This commit is contained in:
Ludovic Marcotte
2019-10-28 14:39:39 -04:00
parent 7ff9921709
commit e866fd5fda
6 changed files with 21 additions and 9 deletions
+16 -3
View File
@@ -477,11 +477,18 @@ static NSArray *childRecordFields = nil;
if ([newName length])
{
[self renameTo: newName];
error = nil;
NS_DURING
{
[self renameTo: newName];
error = nil;
}
NS_HANDLER
error = [NSException exceptionWithHTTPStatus: 409
reason: @"Existing name"];
NS_ENDHANDLER;
}
else
error = [NSException exceptionWithHTTPStatus: 400
error = [NSException exceptionWithHTTPStatus: 403
reason: @"Empty string"];
return error;
@@ -645,6 +652,12 @@ static NSArray *childRecordFields = nil;
- (void) renameTo: (NSString *) newName
{
if (!displayName)
[self displayName];
if ([displayName isEqualToString: newName])
return;
#warning SOGoFolder should have the corresponding method
[displayName release];
displayName = nil;