ObjFW  Diff

Differences From Artifact [0dfbc7e2aa]:

To Artifact [bab7c0bd83]:


142
143
144
145
146
147
148
149

150
151
152
153

154
155
156
157
158
159
160
161
142
143
144
145
146
147
148

149

150
151

152

153
154
155
156
157
158
159







-
+
-


-
+
-







	void *pool = objc_autoreleasePoolPush();
	OFString *oldFileName = _fileName, *oldDirectoryName = _directoryName;
	size_t lastSlash;

	lastSlash = [fileName rangeOfString: @"/"
				    options: OFStringSearchBackwards].location;
	if (lastSlash != OFNotFound) {
		_fileName = [[fileName substringWithRange: OFMakeRange(
		_fileName = [[fileName substringFromIndex: lastSlash + 1] copy];
		    lastSlash + 1, fileName.length - lastSlash - 1)] copy];
		[oldFileName release];

		_directoryName = [[fileName substringWithRange:
		_directoryName = [[fileName substringToIndex: lastSlash] copy];
		    OFMakeRange(0, lastSlash)] copy];
		[oldDirectoryName release];
	} else {
		_fileName = [fileName copy];
		[oldFileName release];

		[_directoryName release];
		_directoryName = nil;