@@ -613,12 +613,11 @@ } return self; } -- (instancetype)initWithString: (OFString *)string - relativeToURL: (OFURL *)URL +- (instancetype)initWithString: (OFString *)string relativeToURL: (OFURL *)URL { char *UTF8String, *UTF8String2 = NULL; if ([string containsString: @"://"]) return [self initWithString: string]; @@ -715,21 +714,18 @@ { bool isDirectory; @try { void *pool = objc_autoreleasePoolPush(); - isDirectory = [path of_isDirectoryPath]; - objc_autoreleasePoolPop(pool); } @catch (id e) { [self release]; @throw e; } - self = [self initFileURLWithPath: path - isDirectory: isDirectory]; + self = [self initFileURLWithPath: path isDirectory: isDirectory]; return self; } - (instancetype)initFileURLWithPath: (OFString *)path @@ -948,22 +944,20 @@ OFString *path = [_URLEncodedPath of_URLPathToPathWithURLEncodedHost: nil]; ret = [[path.pathComponents mutableCopy] autorelease]; if (![ret.firstObject isEqual: @"/"]) - [ret insertObject: @"/" - atIndex: 0]; + [ret insertObject: @"/" atIndex: 0]; } else #endif ret = [[[_URLEncodedPath componentsSeparatedByString: @"/"] mutableCopy] autorelease]; count = ret.count; if (count > 0 && [ret.firstObject length] == 0) - [ret replaceObjectAtIndex: 0 - withObject: @"/"]; + [ret replaceObjectAtIndex: 0 withObject: @"/"]; for (size_t i = 0; i < count; i++) { OFString *component = [ret objectAtIndex: i]; #ifdef OF_HAVE_FILES @@ -1160,36 +1154,29 @@ #endif - (OFURL *)URLByAppendingPathComponent: (OFString *)component { OFMutableURL *URL = [[self mutableCopy] autorelease]; - [URL appendPathComponent: component]; [URL makeImmutable]; - return URL; } - (OFURL *)URLByAppendingPathComponent: (OFString *)component isDirectory: (bool)isDirectory { OFMutableURL *URL = [[self mutableCopy] autorelease]; - - [URL appendPathComponent: component - isDirectory: isDirectory]; + [URL appendPathComponent: component isDirectory: isDirectory]; [URL makeImmutable]; - return URL; } - (OFURL *)URLByStandardizingPath { OFMutableURL *URL = [[self mutableCopy] autorelease]; - [URL standardizePath]; [URL makeImmutable]; - return URL; } - (OFString *)description {