Fix public URLs to Calendars

Fixes #3974
This commit is contained in:
Francis Lachapelle
2017-01-06 16:49:00 -05:00
parent abb1e1b447
commit 327ebf00a4
2 changed files with 4 additions and 7 deletions
+3 -7
View File
@@ -475,9 +475,8 @@ static NSArray *childRecordFields = nil;
davURL = [self realDavURL];
newPath = [NSMutableArray arrayWithArray: [[davURL path] componentsSeparatedByString: @"/"]];
[newPath insertObject: @"public" atIndex: 3];
davURL = [[NSURL alloc] initWithScheme: [davURL scheme]
host: [davURL host]
path: [newPath componentsJoinedByString: @"/"]];
davURL = [NSURL URLWithString: [newPath componentsJoinedByString: @"/"]
relativeToURL: davURL];
return davURL;
}
@@ -500,10 +499,7 @@ static NSArray *childRecordFields = nil;
[container nameInContainer],
[self realNameInContainer]];
currentDavURL = [self davURL];
realDavURL = [[NSURL alloc] initWithScheme: [currentDavURL scheme]
host: [currentDavURL host]
path: path];
[realDavURL autorelease];
realDavURL = [NSURL URLWithString: path relativeToURL: currentDavURL];
}
else
realDavURL = [self davURL];