Differences From Artifact [84c3532ff9]:
- File utils/ofarc/ZooArchive.m — part of check-in [38c16e3793] at 2024-02-28 23:08:48 on branch trunk — OFZooArchiveEntry: Support for POSIX permissions (user: js, size: 9525) [annotate] [blame] [check-ins using]
To Artifact [7815482be6]:
- File
utils/ofarc/ZooArchive.m
— part of check-in
[08eb6b5bca]
at
2024-03-02 09:31:47
on branch trunk
— ofarc: Don't list/extract deleted files by default
Only list them when using -v and only extract them when explicitly
specified on the command line. (user: js, size: 9667) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
117 118 119 120 121 122 123 124 125 126 127 128 129 130 | - (void)listFiles { OFZooArchiveEntry *entry; while ((entry = [_archive nextEntry]) != nil) { void *pool = objc_autoreleasePoolPush(); [OFStdOut writeLine: entry.fileName]; if (app->_outputLevel >= 1) { OFString *modificationDate = [entry.modificationDate localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"]; OFString *compressedSize = [OFString stringWithFormat: | > > > > > | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - (void)listFiles { OFZooArchiveEntry *entry; while ((entry = [_archive nextEntry]) != nil) { void *pool = objc_autoreleasePoolPush(); if (app->_outputLevel < 1 && entry.deleted) { objc_autoreleasePoolPop(pool); continue; } [OFStdOut writeLine: entry.fileName]; if (app->_outputLevel >= 1) { OFString *modificationDate = [entry.modificationDate localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"]; OFString *compressedSize = [OFString stringWithFormat: |
︙ | ︙ | |||
228 229 230 231 232 233 234 235 236 237 238 239 240 241 | OFFile *output; OFStream *stream; unsigned long long written = 0, size = entry.uncompressedSize; int8_t percent = -1, newPercent; if (!all && ![files containsObject: fileName]) continue; [missing removeObject: fileName]; outFileName = [app safeLocalPathForPath: fileName]; if (outFileName == nil) { [OFStdErr writeLine: OF_LOCALIZED( @"refusing_to_extract_file", | > > > | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | OFFile *output; OFStream *stream; unsigned long long written = 0, size = entry.uncompressedSize; int8_t percent = -1, newPercent; if (!all && ![files containsObject: fileName]) continue; if (all && entry.deleted) continue; [missing removeObject: fileName]; outFileName = [app safeLocalPathForPath: fileName]; if (outFileName == nil) { [OFStdErr writeLine: OF_LOCALIZED( @"refusing_to_extract_file", |
︙ | ︙ |