Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -1989,10 +1989,21 @@ last = i + 1; } } [ret addObject: [self substringWithRange: of_range(last, i - last)]]; + +#ifdef OF_WINDOWS + if ([ret count] >= 2 && [[ret objectAtIndex: 0] hasSuffix: @":"]) { + OFString *first = [[ret objectAtIndex: 0] + stringByAppendingPathComponent: [ret objectAtIndex: 1]]; + + [ret removeObjectAtIndex: 0]; + [ret replaceObjectAtIndex: 0 + withObject: first]; + } +#endif [ret makeImmutable]; objc_autoreleasePoolPop(pool); Index: src/OFString_UTF8.m ================================================================== --- src/OFString_UTF8.m +++ src/OFString_UTF8.m @@ -1110,10 +1110,21 @@ } } [ret addObject: [OFString stringWithUTF8String: _s->cString + last length: i - last]]; + +#ifdef OF_WINDOWS + if ([ret count] >= 2 && [[ret objectAtIndex: 0] hasSuffix: @":"]) { + OFString *first = [[ret objectAtIndex: 0] + stringByAppendingPathComponent: [ret objectAtIndex: 1]]; + + [ret removeObjectAtIndex: 0]; + [ret replaceObjectAtIndex: 0 + withObject: first]; + } +#endif [ret makeImmutable]; objc_autoreleasePoolPop(pool);