ObjFW  Diff

Differences From Artifact [db5f1942c0]:

To Artifact [06231a6b0d]:


657
658
659
660
661
662
663
664

665
666
667
668
669


670
671
672
673
674
675
676
677
678
679
680
681

682
683
684

685
686



687
688
689
690
691
692
693
657
658
659
660
661
662
663

664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682

683

684
685
686


687
688
689
690
691
692
693
694
695
696







-
+





+
+











-
+
-


+
-
-
+
+
+








		_fileName = [[stream readStringWithLength: fileNameLength
						 encoding: encoding] copy];
		if (extraFieldLength > 0)
			extraField = [[[stream readDataWithCount:
			    extraFieldLength] mutableCopy] autorelease];

		of_zip_archive_entry_extra_field_find(_extraField,
		of_zip_archive_entry_extra_field_find(extraField,
		    OF_ZIP_ARCHIVE_ENTRY_EXTRA_FIELD_ZIP64, &ZIP64Size);

		if (ZIP64Index != OF_NOT_FOUND) {
			const uint8_t *ZIP64 =
			    [extraField itemAtIndex: ZIP64Index];
			of_range_t range =
			    of_range(ZIP64Index - 4, ZIP64Size + 4);

			if (_uncompressedSize == 0xFFFFFFFF)
				_uncompressedSize = of_zip_archive_read_field64(
				    &ZIP64, &ZIP64Size);
			if (_compressedSize == 0xFFFFFFFF)
				_compressedSize = of_zip_archive_read_field64(
				    &ZIP64, &ZIP64Size);

			if (ZIP64Size > 0)
				@throw [OFInvalidFormatException exception];

			[extraField removeItemsInRange:
			[extraField removeItemsInRange: range];
			    of_range(ZIP64Index - 4, ZIP64Size + 4)];
		}

		if ([extraField count] > 0) {
		[extraField makeImmutable];
		_extraField = [extraField copy];
			[extraField makeImmutable];
			_extraField = [extraField copy];
		}

		objc_autoreleasePoolPop(pool);
	} @catch (id e) {
		[self release];
		@throw e;
	}