962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
|
if ([path hasSuffix: @"/"])
path = [path substringWithRange:
of_range(0, [path length] - 1)];
#if defined(OF_WINDOWS) || defined(OF_MSDOS)
path = [path substringWithRange: of_range(1, [path length] - 1)];
path = [OFString pathWithComponents:
[path componentsSeparatedByString: @"/"]];
#endif
[path retain];
objc_autoreleasePoolPop(pool);
return [path autorelease];
|
|
|
|
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
|
if ([path hasSuffix: @"/"])
path = [path substringWithRange:
of_range(0, [path length] - 1)];
#if defined(OF_WINDOWS) || defined(OF_MSDOS)
path = [path substringWithRange: of_range(1, [path length] - 1)];
path = [path stringByReplacingOccurrencesOfString: @"/"
withString: @"\\"];
#endif
[path retain];
objc_autoreleasePoolPop(pool);
return [path autorelease];
|