@@ -44,10 +44,13 @@ #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS OFNumber *mode = entry.mode; if (mode == nil) return; + + mode = [OFNumber numberWithUnsignedShort: + mode.unsignedShortValue & 0777]; of_file_attributes_t attributes = [OFDictionary dictionaryWithObject: mode forKey: of_file_attribute_key_posix_permissions]; @@ -179,11 +182,11 @@ @"date", date)]; if (entry.mode != nil) { OFString *modeString = [OFString stringWithFormat: - @"%" PRIo16, entry.mode.uInt16Value]; + @"%ho", entry.mode.unsignedShortValue]; [of_stdout writeString: @"\t"]; [of_stdout writeLine: OF_LOCALIZED(@"list_mode", @"Mode: %[mode]", @"mode", modeString)]; @@ -467,20 +470,20 @@ attributes = [fileManager attributesOfItemAtPath: fileName]; type = attributes.fileType; entry = [OFMutableLHAArchiveEntry entryWithFileName: fileName]; #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS - entry.mode = [OFNumber numberWithUInt16: + entry.mode = [OFNumber numberWithUnsignedLong: attributes.filePOSIXPermissions]; #endif entry.date = attributes.fileModificationDate; #ifdef OF_FILE_MANAGER_SUPPORTS_OWNER entry.UID = - [OFNumber numberWithUInt16: attributes.filePOSIXUID]; + [OFNumber numberWithUnsignedLong: attributes.filePOSIXUID]; entry.GID = - [OFNumber numberWithUInt16: attributes.filePOSIXGID]; + [OFNumber numberWithUnsignedLong: attributes.filePOSIXGID]; entry.owner = attributes.fileOwner; entry.group = attributes.fileGroup; #endif if ([type isEqual: of_file_type_directory])