@@ -654,22 +654,20 @@ #endif + (OFString*)pathWithComponents: (OFArray*)components { OFMutableString *ret = [OFMutableString string]; - void *pool = objc_autoreleasePoolPush(); - OFEnumerator *enumerator = [components objectEnumerator]; - OFString *component; - - if ((component = [enumerator nextObject]) != nil) - [ret appendString: component]; - while ((component = [enumerator nextObject]) != nil) { - [ret appendString: OF_PATH_DELIMITER_STRING]; - [ret appendString: component]; - } - - objc_autoreleasePoolPop(pool); + bool first = true; + + for (OFString *component in components) { + if (!first) + [ret appendString: OF_PATH_DELIMITER_STRING]; + + [ret appendString: component]; + + first = false; + } return ret; } - init