Cube  Diff

Differences From Artifact [0afcae2b92]:

To Artifact [e9d197474b]:


334
335
336
337
338
339
340
341
342
343
344
345
346


347
348
349
350
351
352
353
354
355
356
357
358
359
360




361
362
363
364
365
366
367
368
369

		if (completeidx >= idx)
			completeidx = 0;
	}
}

bool
execfile(OFString *cfgfile)
{
	@autoreleasepool {
		OFString *command;
		@try {
			command = [OFString stringWithContentsOfFile:cfgfile];


		} @catch (id e) {
			return false;
		}

		execute(command);
		return true;
	}
}

void
exec(OFString *cfgfile)
{
	if (!execfile(cfgfile)) {
		@autoreleasepool {




			conoutf(@"could not read \"%@\"", cfgfile);
		}
	}
}

void
writecfg()
{
	OFStream *stream;







|




|
>
>
|











<
|
>
>
>
>

<







334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360

361
362
363
364
365
366

367
368
369
370
371
372
373

		if (completeidx >= idx)
			completeidx = 0;
	}
}

bool
execfile(OFIRI *cfgfile)
{
	@autoreleasepool {
		OFString *command;
		@try {
			command = [OFString stringWithContentsOfIRI:cfgfile];
		} @catch (OFOpenItemFailedException *e) {
			return false;
		} @catch (OFReadFailedException *e) {
			return false;
		}

		execute(command);
		return true;
	}
}

void
exec(OFString *cfgfile)
{

	@autoreleasepool {
		if (!execfile([Cube.sharedInstance.userDataIRI
		        IRIByAppendingPathComponent:cfgfile]) &&
		    !execfile([Cube.sharedInstance.gameDataIRI
		        IRIByAppendingPathComponent:cfgfile]))
			conoutf(@"could not read \"%@\"", cfgfile);

	}
}

void
writecfg()
{
	OFStream *stream;