@@ -278,12 +278,12 @@ enumerator = [pathComponents objectEnumerator]; while ((component = [enumerator nextObject]) != nil) { void *pool2 = objc_autoreleasePoolPush(); if (currentPath != nil) - currentPath = [OFString - stringWithPath: currentPath, component, nil]; + currentPath = [currentPath + stringByAppendingPathComponent: component]; else currentPath = component; if ([currentPath length] > 0 && ![OFFile directoryExistsAtPath: currentPath]) @@ -523,13 +523,13 @@ @throw [OFInvalidArgumentException exception]; pool = objc_autoreleasePoolPush(); if ([self directoryExistsAtPath: destination]) { - OFString *filename = [source lastPathComponent]; - destination = [OFString stringWithPath: destination, filename, - nil]; + OFArray *components = [OFArray arrayWithObjects: + destination, [source lastPathComponent], nil]; + destination = [OFString pathWithComponents: components]; } override = [self fileExistsAtPath: destination]; pageSize = [OFSystemInfo pageSize]; @@ -581,13 +581,13 @@ @throw [OFInvalidArgumentException exception]; pool = objc_autoreleasePoolPush(); if ([self directoryExistsAtPath: destination]) { - OFString *filename = [source lastPathComponent]; - destination = [OFString stringWithPath: destination, filename, - nil]; + OFArray *components = [OFArray arrayWithObjects: + destination, [source lastPathComponent], nil]; + destination = [OFString pathWithComponents: components]; } #ifndef _WIN32 if (rename([source cStringWithEncoding: OF_STRING_ENCODING_NATIVE], [destination cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) @@ -625,13 +625,13 @@ @throw [OFInvalidArgumentException exception]; pool = objc_autoreleasePoolPush(); if ([self directoryExistsAtPath: destination]) { - OFString *filename = [source lastPathComponent]; - destination = [OFString stringWithPath: destination, filename, - nil]; + OFArray *components = [OFArray arrayWithObjects: + destination, [source lastPathComponent], nil]; + destination = [OFString pathWithComponents: components]; } if (link([source cStringWithEncoding: OF_STRING_ENCODING_NATIVE], [destination cStringWithEncoding: OF_STRING_ENCODING_NATIVE]) != 0) @throw [OFLinkFailedException @@ -652,13 +652,13 @@ @throw [OFInvalidArgumentException exception]; pool = objc_autoreleasePoolPush(); if ([self directoryExistsAtPath: destination]) { - OFString *filename = [source lastPathComponent]; - destination = [OFString stringWithPath: destination, filename, - nil]; + OFArray *components = [OFArray arrayWithObjects: + destination, [source lastPathComponent], nil]; + destination = [OFString pathWithComponents: components]; } if (symlink([source cStringWithEncoding: OF_STRING_ENCODING_NATIVE], [destination cStringWithEncoding: OF_STRING_ENCODING_NATIVE]) != 0) @throw [OFCreateSymbolicLinkFailedException