Index: src/OFURL.m ================================================================== --- src/OFURL.m +++ src/OFURL.m @@ -827,23 +827,27 @@ } - (OFArray *)pathComponents { void *pool = objc_autoreleasePoolPush(); +#ifdef OF_HAVE_FILES bool isFile = [_URLEncodedScheme isEqual: @"file"]; +#endif OFMutableArray *ret; size_t count; +#ifdef OF_HAVE_FILES if (isFile) { OFString *path = [_URLEncodedPath of_URLPathToPathWithURLEncodedHost: nil]; ret = [[path.pathComponents mutableCopy] autorelease]; if (![ret.firstObject isEqual: @"/"]) [ret insertObject: @"/" atIndex: 0]; } else +#endif ret = [[[_URLEncodedPath componentsSeparatedByString: @"/"] mutableCopy] autorelease]; count = ret.count; @@ -852,13 +856,15 @@ withObject: @"/"]; for (size_t i = 0; i < count; i++) { OFString *component = [ret objectAtIndex: i]; +#ifdef OF_HAVE_FILES if (isFile) component = [component of_pathComponentToURLPathComponent]; +#endif [ret replaceObjectAtIndex: i withObject: component.stringByURLDecoding]; }