Differences From Artifact [504e6ffdaf]:
- File src/OFArchiveIRIHandler.m — part of check-in [b66e682fc6] at 2024-03-03 23:34:35 on branch trunk — OFFileIRIHandler: Correctly transform exception (user: js, size: 5744) [annotate] [blame] [check-ins using]
To Artifact [78d87309e9]:
- File
src/OFArchiveIRIHandler.m
— part of check-in
[34a3e817b3]
at
2024-03-04 01:21:52
on branch trunk
— Rename schemes for archive IRI handlers back
The naming was confusing, as it is used to refer to a specific file in
an archive and not the entire archive. (user: js, size: 5712) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
89 90 91 92 93 94 95 | archiveIRI = [OFIRI IRIWithString: [percentEncodedPath substringWithRange: OFMakeRange(0, pos)] .stringByRemovingPercentEncoding]; path = [percentEncodedPath substringWithRange: OFMakeRange(pos + 1, percentEncodedPath.length - pos - 1)] .stringByRemovingPercentEncoding; | | | | | | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | archiveIRI = [OFIRI IRIWithString: [percentEncodedPath substringWithRange: OFMakeRange(0, pos)] .stringByRemovingPercentEncoding]; path = [percentEncodedPath substringWithRange: OFMakeRange(pos + 1, percentEncodedPath.length - pos - 1)] .stringByRemovingPercentEncoding; if ([scheme isEqual: @"lha"]) { OFLHAArchive *archive = [OFLHAArchive archiveWithIRI: archiveIRI mode: mode]; OFLHAArchiveEntry *entry; while ((entry = [archive nextEntry]) != nil) { if ([entry.fileName isEqual: path]) { stream = [archive streamForReadingCurrentEntry]; goto end; } } @throw [OFOpenItemFailedException exceptionWithIRI: IRI mode: mode errNo: ENOENT]; } else if ([scheme isEqual: @"tar"]) { OFTarArchive *archive = [OFTarArchive archiveWithIRI: archiveIRI mode: mode]; OFTarArchiveEntry *entry; while ((entry = [archive nextEntry]) != nil) { if ([entry.fileName isEqual: path]) { stream = [archive streamForReadingCurrentEntry]; goto end; } } @throw [OFOpenItemFailedException exceptionWithIRI: IRI mode: mode errNo: ENOENT]; } else if ([scheme isEqual: @"zip"]) { OFZIPArchive *archive = [OFZIPArchive archiveWithIRI: archiveIRI mode: mode]; stream = [archive streamForReadingFile: path]; } else if ([scheme isEqual: @"zoo"]) { OFZooArchive *archive = [OFZooArchive archiveWithIRI: archiveIRI mode: mode]; OFZooArchiveEntry *entry; while ((entry = [archive nextEntry]) != nil) { if ([entry.fileName isEqual: path]) { stream = [archive streamForReadingCurrentEntry]; |
︙ | ︙ |