ObjFW  Check-in [037a74f7e6]

Overview
Comment:OFZIPArchive: Exclude bit 11 from GPBF comparison
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 037a74f7e6234e5c6aa8064f1a7b97d4e010f793d4a6e6c18eb5d89941a1e016
User & Date: js on 2015-04-13 11:56:17
Other Links: manifest | tags
Context
2015-04-14
19:34
OFKernelEventObserver*.m: Minor cleanup check-in: 5924cc3a92 user: js tags: trunk
2015-04-13
11:56
OFZIPArchive: Exclude bit 11 from GPBF comparison check-in: 037a74f7e6 user: js tags: trunk
2015-04-12
20:04
Add OFObserveFailedException check-in: 97da88f926 user: js tags: trunk
Changes

Modified src/OFZIPArchive.m from [f4015d2b21] to [5f89bfb09f].

422
423
424
425
426
427
428










429
430
431
432
433
434
435
436
437
	[_extraField release];

	[super dealloc];
}

- (bool)matchesEntry: (OFZIPArchiveEntry*)entry
{










	if (_minVersionNeeded != [entry minVersionNeeded] ||
	    _generalPurposeBitFlag != [entry OF_generalPurposeBitFlag] ||
	    _compressionMethod != [entry compressionMethod] ||
	    _lastModifiedFileTime != [entry OF_lastModifiedFileTime] ||
	    _lastModifiedFileDate != [entry OF_lastModifiedFileDate])
		return false;

	if (!(_generalPurposeBitFlag & (1 << 3)))
		if (_CRC32 != [entry CRC32] ||







>
>
>
>
>
>
>
>
>
>

|







422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
	[_extraField release];

	[super dealloc];
}

- (bool)matchesEntry: (OFZIPArchiveEntry*)entry
{
	/*
	 * Bit 11 is the Language Encoding Flag, which some implementations
	 * only set in the Central Directory Entry, but not in the Local File
	 * Header. Therefore, ignore it for the comparison of the General
	 * Purpose Bit Flag.
	 */
	uint16_t generalPurposeBitFlag = _generalPurposeBitFlag & ~(1 << 11);
	uint16_t entryGeneralPurposeBitFlag =
	    [entry OF_generalPurposeBitFlag] & ~(1 << 11);

	if (_minVersionNeeded != [entry minVersionNeeded] ||
	    generalPurposeBitFlag != entryGeneralPurposeBitFlag ||
	    _compressionMethod != [entry compressionMethod] ||
	    _lastModifiedFileTime != [entry OF_lastModifiedFileTime] ||
	    _lastModifiedFileDate != [entry OF_lastModifiedFileDate])
		return false;

	if (!(_generalPurposeBitFlag & (1 << 3)))
		if (_CRC32 != [entry CRC32] ||