Differences From Artifact [05dbf8ce6d]:
- File utils/ofarc/ZIPArchive.m — part of check-in [0ca94307e6] at 2024-03-10 18:44:57 on branch trunk — OFIRI: Add methods for path extension (user: js, size: 15007) [annotate] [blame] [check-ins using]
To Artifact [f42e8a7cde]:
- File
utils/ofarc/ZIPArchive.m
— part of check-in
[ddcef349e5]
at
2024-03-10 23:10:26
on branch trunk
— ofarc: Fix multipart ZIP files
This was broken when switching adding the path extension to the IRI
methods. (user: js, size: 15001) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
129 130 131 132 133 134 135 | - (OFSeekableStream *)archive: (OFZIPArchive *)archive wantsPartNumbered: (unsigned int)partNumber lastPartNumber: (unsigned int)lastPartNumber { OFIRI *IRI; | | | | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - (OFSeekableStream *)archive: (OFZIPArchive *)archive wantsPartNumbered: (unsigned int)partNumber lastPartNumber: (unsigned int)lastPartNumber { OFIRI *IRI; if ([_archiveIRI.pathExtension caseInsensitiveCompare: @"zip"] != OFOrderedSame) return nil; if (partNumber > 98) return nil; if (partNumber == lastPartNumber) IRI = _archiveIRI; else { OFMutableIRI *copy = [[_archiveIRI mutableCopy] autorelease]; [copy deletePathExtension]; [copy appendPathExtension: [OFString stringWithFormat: @"z%02u", partNumber + 1]]; [copy makeImmutable]; IRI = copy; } return (OFSeekableStream *)[OFIRIHandler openItemAtIRI: IRI mode: @"r"]; } |
︙ | ︙ |