Index: src/OFFileManager.m ================================================================== --- src/OFFileManager.m +++ src/OFFileManager.m @@ -186,34 +186,18 @@ #endif } - (OFURL *)currentDirectoryURL { - OFMutableURL *URL = [OFMutableURL URL]; void *pool = objc_autoreleasePoolPush(); - OFString *path; - - [URL setScheme: @"file"]; - -#if OF_PATH_DELIMITER != '/' - path = [[[self currentDirectoryPath] pathComponents] - componentsJoinedByString: @"/"]; -#else - path = [self currentDirectoryPath]; -#endif - -#ifndef OF_PATH_STARTS_WITH_SLASH - path = [path stringByPrependingString: @"/"]; -#endif - - [URL setPath: [path stringByAppendingString: @"/"]]; - - [URL makeImmutable]; - + OFURL *ret; + + ret = [OFURL fileURLWithPath: [self currentDirectoryPath]]; + + [ret retain]; objc_autoreleasePoolPop(pool); - - return URL; + return [ret autorelease]; } - (of_file_attributes_t)attributesOfItemAtURL: (OFURL *)URL { OFURLHandler *URLHandler;