ObjFW  Diff

Differences From Artifact [0ef8b1e769]:

To Artifact [bef5ba2521]:


151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
		    [OFMutableString stringWithString: programName];
		[argumentsString replaceOccurrencesOfString: @"\\\""
						 withString: @"\\\\\""];
		[argumentsString replaceOccurrencesOfString: @"\""
						 withString: @"\\\""];

		if ([argumentsString containsString: @" "]) {
			[argumentsString prependString: @"\""];
			[argumentsString appendString: @"\""];
		}

		for (OFString *argument in arguments) {
			OFMutableString *tmp =
			    [[argument mutableCopy] autorelease];
			bool containsSpaces = [tmp containsString: @" "];







|







151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
		    [OFMutableString stringWithString: programName];
		[argumentsString replaceOccurrencesOfString: @"\\\""
						 withString: @"\\\\\""];
		[argumentsString replaceOccurrencesOfString: @"\""
						 withString: @"\\\""];

		if ([argumentsString containsString: @" "]) {
			[argumentsString insertString: @"\"" atIndex: 0];
			[argumentsString appendString: @"\""];
		}

		for (OFString *argument in arguments) {
			OFMutableString *tmp =
			    [[argument mutableCopy] autorelease];
			bool containsSpaces = [tmp containsString: @" "];
366
367
368
369
370
371
372
373


374
375
376
377
378
379
380
381
	}

	return (size_t)bytesWritten;
}

- (void)closeForWriting
{
	if (_writePipe[1] != NULL)


		CloseHandle(_writePipe[1]);

	_writePipe[1] = NULL;
}

- (void)close
{
	if (_readPipe[0] == NULL)







|
>
>
|







366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
	}

	return (size_t)bytesWritten;
}

- (void)closeForWriting
{
	if (_readPipe[0] == NULL || _writePipe[1] == NULL)
		@throw [OFNotOpenException exceptionWithObject: self];

	CloseHandle(_writePipe[1]);

	_writePipe[1] = NULL;
}

- (void)close
{
	if (_readPipe[0] == NULL)