@@ -72,12 +72,12 @@ * archive. */ if ([scheme isEqual: @"gzip"]) { stream = [OFIRIHandler openItemAtIRI: [OFIRI IRIWithString: IRI.path] - mode: @"r"]; - stream = [OFGZIPStream streamWithStream: stream mode: @"r"]; + mode: mode]; + stream = [OFGZIPStream streamWithStream: stream mode: mode]; goto end; } percentEncodedPath = IRI.percentEncodedPath; pos = [percentEncodedPath rangeOfString: @"!"].location; @@ -92,11 +92,11 @@ OFMakeRange(pos + 1, percentEncodedPath.length - pos - 1)] .stringByRemovingPercentEncoding; if ([scheme isEqual: @"lha"]) { OFLHAArchive *archive = [OFLHAArchive archiveWithIRI: archiveIRI - mode: @"r"]; + mode: mode]; OFLHAArchiveEntry *entry; while ((entry = [archive nextEntry]) != nil) { if ([entry.fileName isEqual: path]) { stream = [archive streamForReadingCurrentEntry]; @@ -107,11 +107,11 @@ @throw [OFOpenItemFailedException exceptionWithIRI: IRI mode: mode errNo: ENOENT]; } else if ([scheme isEqual: @"tar"]) { OFTarArchive *archive = [OFTarArchive archiveWithIRI: archiveIRI - mode: @"r"]; + mode: mode]; OFTarArchiveEntry *entry; while ((entry = [archive nextEntry]) != nil) { if ([entry.fileName isEqual: path]) { stream = [archive streamForReadingCurrentEntry]; @@ -122,11 +122,11 @@ @throw [OFOpenItemFailedException exceptionWithIRI: IRI mode: mode errNo: ENOENT]; } else if ([scheme isEqual: @"zip"]) { OFZIPArchive *archive = [OFZIPArchive archiveWithIRI: archiveIRI - mode: @"r"]; + mode: mode]; stream = [archive streamForReadingFile: path]; } else @throw [OFInvalidArgumentException exception];