Differences From Artifact [a1e8c6e072]:
- File
utils/ofarc/LHAArchive.m
— part of check-in
[6f13f74134]
at
2022-08-27 20:23:24
on branch trunk
— OFLHAArchiveEntry: Make (un)compressedSize ull
There's newer, less common LHA versions that allow 64 bit for the size.
However, for consistency with OFTarArchiveEntry, use unsigned long long
instead of uint64_t. (user: js, size: 13586) [annotate] [blame] [check-ins using]
To Artifact [7f7a619844]:
- File utils/ofarc/LHAArchive.m — part of check-in [406134b5e2] at 2022-08-27 23:53:22 on branch trunk — OFArchiveEntry: Add more properties (user: js, size: 14006) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
36 37 38 39 40 41 42 | withString: @"\n\t"]; } static void setPermissions(OFString *path, OFLHAArchiveEntry *entry) { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS | | | | | | | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | withString: @"\n\t"]; } static void setPermissions(OFString *path, OFLHAArchiveEntry *entry) { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS OFNumber *POSIXPermissions = entry.POSIXPermissions; if (POSIXPermissions == nil) return; POSIXPermissions = [OFNumber numberWithUnsignedShort: POSIXPermissions.unsignedShortValue & 0777]; OFFileAttributes attributes = [OFDictionary dictionaryWithObject: POSIXPermissions forKey: OFFilePOSIXPermissions]; [[OFFileManager defaultManager] setAttributes: attributes ofItemAtPath: path]; #endif } |
︙ | ︙ | |||
162 163 164 165 166 167 168 | @"crc16", CRC16)]; [OFStdOut writeString: @"\t"]; [OFStdOut writeLine: OF_LOCALIZED( @"list_modification_date", @"Modification date: %[date]", @"date", modificationDate)]; | | | | > | | > | | | | > | | | | | | | | | | | | | | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | @"crc16", CRC16)]; [OFStdOut writeString: @"\t"]; [OFStdOut writeLine: OF_LOCALIZED( @"list_modification_date", @"Modification date: %[date]", @"date", modificationDate)]; if (entry.POSIXPermissions != nil) { OFString *permissionsString = [OFString stringWithFormat: @"%llo", entry.POSIXPermissions .unsignedLongLongValue]; [OFStdOut writeString: @"\t"]; [OFStdOut writeLine: OF_LOCALIZED( @"list_posix_permissions", @"POSIX permissions: %[perm]", @"perm", permissionsString)]; } if (entry.ownerAccountID != nil) { [OFStdOut writeString: @"\t"]; [OFStdOut writeLine: OF_LOCALIZED( @"list_owner_account_id", @"Owner account ID: %[id]", @"id", entry.ownerAccountID)]; } if (entry.groupOwnerAccountID != nil) { [OFStdOut writeString: @"\t"]; [OFStdOut writeLine: OF_LOCALIZED(@"list_gid", @"Group owner account ID: %[id]", @"id", entry.groupOwnerAccountID)]; } if (entry.ownerAccountName != nil) { [OFStdOut writeString: @"\t"]; [OFStdOut writeLine: OF_LOCALIZED( @"list_owner_account_name", @"Owner account name: %[name]", @"name", entry.ownerAccountName)]; } if (entry.groupOwnerAccountName != nil) { [OFStdOut writeString: @"\t"]; [OFStdOut writeLine: OF_LOCALIZED( @"list_group_owner_account_name", @"Group: %[name]", @"name", entry.groupOwnerAccountName)]; } if (app->_outputLevel >= 2) { OFString *headerLevel = [OFString stringWithFormat: @"%" PRIu8, entry.headerLevel]; |
︙ | ︙ | |||
440 441 442 443 444 445 446 | @"file", fileName)]; attributes = [fileManager attributesOfItemAtPath: fileName]; type = attributes.fileType; entry = [OFMutableLHAArchiveEntry entryWithFileName: fileName]; #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS | | | | | | | | > | > | 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | @"file", fileName)]; attributes = [fileManager attributesOfItemAtPath: fileName]; type = attributes.fileType; entry = [OFMutableLHAArchiveEntry entryWithFileName: fileName]; #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS entry.POSIXPermissions = [attributes objectForKey: OFFilePOSIXPermissions]; #endif entry.modificationDate = attributes.fileModificationDate; #ifdef OF_FILE_MANAGER_SUPPORTS_OWNER entry.ownerAccountID = [attributes objectForKey: OFFileOwnerAccountID]; entry.groupOwnerAccountID = [attributes objectForKey: OFFileGroupOwnerAccountID]; entry.ownerAccountName = [attributes objectForKey: OFFileOwnerAccountName]; entry.groupOwnerAccountName = [attributes objectForKey: OFFileGroupOwnerAccountName]; #endif if ([type isEqual: OFFileTypeDirectory]) { entry.compressionMethod = @"-lhd-"; if (![entry.fileName hasSuffix: @"/"]) entry.fileName = [entry.fileName |
︙ | ︙ |