ObjFW  Check-in [d3d6b0c5e3]

Overview
Comment:Use IRI.fileSystemRepresentation where appropriate
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d3d6b0c5e3de0a071530d8c71c239456e36cf5eede4a63ace8353fec42f08a3c
User & Date: js on 2024-03-03 23:44:55
Other Links: manifest | tags
Context
2024-03-03
23:49
Link ofarc against ObjFWTLS check-in: 7162c635dd user: js tags: trunk
23:44
Use IRI.fileSystemRepresentation where appropriate check-in: d3d6b0c5e3 user: js tags: trunk
23:34
OFFileIRIHandler: Correctly transform exception check-in: b66e682fc6 user: js tags: trunk
Changes

Modified utils/ofarc/OFArc.m from [487eb6d138] to [03e08f3480].

358
359
360
361
362
363
364
365

366
367
368
369
370
371
372
358
359
360
361
362
363
364

365
366
367
368
369
370
371
372







-
+








		IRI = argumentToIRI(remainingArguments.firstObject, isIRI);
		files = [remainingArguments objectsInRange:
		    OFMakeRange(1, remainingArguments.count - 1)];

#ifdef OF_HAVE_SANDBOX
		if ([IRI.scheme isEqual: @"file"])
			[sandbox unveilPath: IRI.path
			[sandbox unveilPath: IRI.fileSystemRepresentation
				permissions: (mode == 'a' ? @"rwc" : @"wc")];

		for (OFString *path in files)
			[sandbox unveilPath: path permissions: @"r"];

		sandbox.allowsUnveil = false;
		[OFApplication of_activateSandbox: sandbox];
383
384
385
386
387
388
389
390

391
392
393
394
395
396
397
383
384
385
386
387
388
389

390
391
392
393
394
395
396
397







-
+







		if (remainingArguments.count != 1)
			help(OFStdErr, false, 1);

		IRI = argumentToIRI(remainingArguments.firstObject, isIRI);

#ifdef OF_HAVE_SANDBOX
		if ([IRI.scheme isEqual: @"file"])
			[sandbox unveilPath: IRI.path
			[sandbox unveilPath: IRI.fileSystemRepresentation
				permissions: @"r"];

		sandbox.allowsUnveil = false;
		[OFApplication of_activateSandbox: sandbox];
#endif

		archive = [self openArchiveWithIRI: IRI
407
408
409
410
411
412
413
414

415
416
417
418
419
420
421
407
408
409
410
411
412
413

414
415
416
417
418
419
420
421







-
+








		IRI = argumentToIRI(remainingArguments.firstObject, isIRI);
		files = [remainingArguments objectsInRange:
		    OFMakeRange(1, remainingArguments.count - 1)];

#ifdef OF_HAVE_SANDBOX
		if ([IRI.scheme isEqual: @"file"])
			[sandbox unveilPath: IRI.path
			[sandbox unveilPath: IRI.fileSystemRepresentation
				permissions: @"r"];

		sandbox.allowsUnveil = false;
		[OFApplication of_activateSandbox: sandbox];
#endif

		archive = [self openArchiveWithIRI: IRI
431
432
433
434
435
436
437
438

439
440
441
442
443
444
445
431
432
433
434
435
436
437

438
439
440
441
442
443
444
445







-
+








		IRI = argumentToIRI(remainingArguments.firstObject, isIRI);
		files = [remainingArguments objectsInRange:
		    OFMakeRange(1, remainingArguments.count - 1)];

#ifdef OF_HAVE_SANDBOX
		if ([IRI.scheme isEqual: @"file"])
			[sandbox unveilPath: IRI.path
			[sandbox unveilPath: IRI.fileSystemRepresentation
				permissions: @"r"];

		if (files.count > 0)
			for (OFString *path in files)
				[sandbox unveilPath: path permissions: @"wc"];
		else {
			OFString *path = outputDir;