ObjFW  Diff

Differences From Artifact [5c5bcb3795]:

To Artifact [732031f459]:


484
485
486
487
488
489
490
491

492
493
494
495


496
497
498
499
500
501
502
484
485
486
487
488
489
490

491
492
493
494
495
496
497
498
499
500
501
502
503
504







-
+




+
+







		help(OFStdErr, true, 1);
		break;
	}

	[OFApplication terminateWithStatus: _exitStatus];
}

- (id <Archive>)openArchiveWithPath: (OFString *)path
- (id <Archive>)openArchiveWithPath: (OFString *)path_
			       type: (OFString *)type
			       mode: (char)mode
			   encoding: (OFStringEncoding)encoding
{
	/* To make clang-analyzer happy about assigning nil to path later. */
	OFString *path = path_;
	OFString *modeString, *fileModeString;
	OFStream *file = nil;
	id <Archive> archive = nil;

	[_archivePath release];
	_archivePath = [path copy];

643
644
645
646
647
648
649
650

651
652
653
654

655
656
657
658
659
660
661
645
646
647
648
649
650
651

652
653
654
655

656
657
658
659
660
661
662
663







-
+



-
+







		writingNotSupported(type);
		goto error;
	}

	return archive;

error:
	if (mode == 'c')
	if (mode == 'c' && path != nil)
		[[OFFileManager defaultManager] removeItemAtPath: path];

	[OFApplication terminateWithStatus: 1];
	return nil;
	abort();
}

- (bool)shouldExtractFile: (OFString *)fileName
	      outFileName: (OFString *)outFileName
{
	OFString *line;