+2004-10-03 Helge Hess <helge.hess@opengroupware.org>
+
+ * FdExt.subproj/NSURL+misc.m: fixed URL processing in some edge case
+ (v4.3.120)
+
2004-10-02 Helge Hess <helge.hess@opengroupware.org>
* NGQuotedPrintableCoding.m: minor code cleanups (v4.3.119)
NSString *relPath;
if (_base == self || _base == nil) {
- relPath = [[self pathWithCorrectTrailingSlash] urlPathRelativeToSelf];
+ relPath = [self pathWithCorrectTrailingSlash];
+ relPath = [relPath urlPathRelativeToSelf];
relPath = [self stringByAddingFragmentAndQueryToPath:relPath];
if (debugURLProcessing) {
NSLog(@"%s: no base or base is self => '%@'",
*/
NSString *p;
NSString *lp;
+
+ /*
+ /SOGo/so/X/Mail/Y/INBOX/withsubdirs/
+ ..//SOGo/so/X/Mail/Y/INBOX/withsubdirs//
+ */
p = self;
lp = [p lastPathComponent];
+ if (![p hasSuffix:@"/"])
+ return lp;
- p = ([p hasSuffix:@"/"])
- ? [NSString stringWithFormat:@"../%@/", p]
- : lp;
- return p;
+ return [[@"../" stringByAppendingString:lp] stringByAppendingString:@"/"];
}
- (NSString *)urlPathRelativeToRoot {