Differences From Artifact [eb89655310]:
- File utils/ofarc/OFArc.m — part of check-in [8939cbdb52] at 2023-01-06 09:04:02 on branch trunk — Update copyright (user: js, size: 21780) [annotate] [blame] [check-ins using] [more...]
To Artifact [5c5bcb3795]:
- File
utils/ofarc/OFArc.m
— part of check-in
[f2109cf1c3]
at
2023-07-22 14:47:51
on branch trunk
— utils/ofarc: Pass the path of the archive
This is in preparation for supporting split archives. (user: js, size: 21893) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
530 531 532 533 534 535 536 537 538 539 540 541 542 543 | case 'p': case 'x': file = OFStdIn; break; default: @throw [OFInvalidArgumentException exception]; } } else { @try { file = [OFFile fileWithPath: path mode: fileModeString]; } @catch (OFOpenItemFailedException *e) { OFString *error = [OFString stringWithCString: strerror(e.errNo) encoding: [OFLocale encoding]]; | > > | 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 | case 'p': case 'x': file = OFStdIn; break; default: @throw [OFInvalidArgumentException exception]; } path = nil; } else { @try { file = [OFFile fileWithPath: path mode: fileModeString]; } @catch (OFOpenItemFailedException *e) { OFString *error = [OFString stringWithCString: strerror(e.errNo) encoding: [OFLocale encoding]]; |
︙ | ︙ | |||
564 565 566 567 568 569 570 | type = @"tar"; else type = @"zip"; } @try { if ([type isEqual: @"gz"]) | | > | | | > | | | > | | | > | | | > | | | 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 | type = @"tar"; else type = @"zip"; } @try { if ([type isEqual: @"gz"]) archive = [GZIPArchive archiveWithPath: path stream: file mode: modeString encoding: encoding]; else if ([type isEqual: @"lha"]) archive = [LHAArchive archiveWithPath: path stream: file mode: modeString encoding: encoding]; else if ([type isEqual: @"tar"]) archive = [TarArchive archiveWithPath: path stream: file mode: modeString encoding: encoding]; else if ([type isEqual: @"tgz"]) { OFStream *GZIPStream = [OFGZIPStream streamWithStream: file mode: modeString]; archive = [TarArchive archiveWithPath: path stream: GZIPStream mode: modeString encoding: encoding]; } else if ([type isEqual: @"zip"]) archive = [ZIPArchive archiveWithPath: path stream: file mode: modeString encoding: encoding]; else { [OFStdErr writeLine: OF_LOCALIZED( @"unknown_archive_type", @"Unknown archive type: %[type]", @"type", type)]; goto error; } |
︙ | ︙ |