@@ -38,20 +38,20 @@ static void setPermissions(OFString *path, OFLHAArchiveEntry *entry) { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS - OFNumber *mode = entry.mode; + OFNumber *POSIXPermissions = entry.POSIXPermissions; - if (mode == nil) + if (POSIXPermissions == nil) return; - mode = [OFNumber numberWithUnsignedShort: - mode.unsignedShortValue & 0777]; + POSIXPermissions = [OFNumber numberWithUnsignedShort: + POSIXPermissions.unsignedShortValue & 0777]; OFFileAttributes attributes = [OFDictionary - dictionaryWithObject: mode + dictionaryWithObject: POSIXPermissions forKey: OFFilePOSIXPermissions]; [[OFFileManager defaultManager] setAttributes: attributes ofItemAtPath: path]; #endif @@ -164,45 +164,48 @@ [OFStdOut writeLine: OF_LOCALIZED( @"list_modification_date", @"Modification date: %[date]", @"date", modificationDate)]; - if (entry.mode != nil) { - OFString *modeString = [OFString - stringWithFormat: - @"%ho", entry.mode.unsignedShortValue]; - - [OFStdOut writeString: @"\t"]; - [OFStdOut writeLine: OF_LOCALIZED(@"list_mode", - @"Mode: %[mode]", - @"mode", modeString)]; - } - if (entry.UID != nil) { - [OFStdOut writeString: @"\t"]; - [OFStdOut writeLine: OF_LOCALIZED(@"list_uid", - @"UID: %[uid]", - @"uid", entry.UID)]; - } - if (entry.GID != nil) { + 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", - @"GID: %[gid]", - @"gid", entry.GID)]; - } - if (entry.owner != nil) { - [OFStdOut writeString: @"\t"]; - [OFStdOut writeLine: OF_LOCALIZED( - @"list_owner", - @"Owner: %[owner]", - @"owner", entry.owner)]; - } - if (entry.group != nil) { - [OFStdOut writeString: @"\t"]; - [OFStdOut writeLine: OF_LOCALIZED( - @"list_group", - @"Group: %[group]", - @"group", entry.group)]; + @"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, @@ -442,22 +445,24 @@ attributes = [fileManager attributesOfItemAtPath: fileName]; type = attributes.fileType; entry = [OFMutableLHAArchiveEntry entryWithFileName: fileName]; #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS - entry.mode = [OFNumber numberWithUnsignedLong: - attributes.filePOSIXPermissions]; + entry.POSIXPermissions = + [attributes objectForKey: OFFilePOSIXPermissions]; #endif entry.modificationDate = attributes.fileModificationDate; #ifdef OF_FILE_MANAGER_SUPPORTS_OWNER - entry.UID = [OFNumber numberWithUnsignedLong: - attributes.fileOwnerAccountID]; - entry.GID = [OFNumber numberWithUnsignedLong: - attributes.fileGroupOwnerAccountID]; - entry.owner = attributes.fileOwnerAccountName; - entry.group = attributes.fileGroupOwnerAccountName; + 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-";