Fix some tar model issues

This commit is contained in:
Matt Nadareski
2025-08-28 08:56:11 -04:00
parent 2350c1af27
commit f5da54eaac
3 changed files with 8 additions and 8 deletions

View File

@@ -7,6 +7,6 @@ namespace SabreTools.Models.TAR
/// <summary>
/// 1 or more entries
/// </summary>
public List<Entry>? Entries { get; set; }
public Entry[]? Entries { get; set; }
}
}

View File

@@ -2,6 +2,6 @@ namespace SabreTools.Models.TAR
{
public sealed class Block
{
public readonly byte[] Data = new byte[512];
public byte[]? Data = new byte[512];
}
}

View File

@@ -17,42 +17,42 @@ namespace SabreTools.Models.TAR
/// </summary>
/// <remarks>Octal string representation</remarks>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
public byte[]? Mode;
public string? Mode;
/// <summary>
/// Owner's numeric user ID
/// </summary>
/// <remarks>Octal string representation</remarks>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
public byte[]? UID;
public string? UID;
/// <summary>
/// Owner's numeric group ID
/// </summary>
/// <remarks>Octal string representation</remarks>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
public byte[]? GID;
public string? GID;
/// <summary>
/// File size in bytes
/// </summary>
/// <remarks>Octal string representation</remarks>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 12)]
public byte[]? Size;
public string? Size;
/// <summary>
/// Last modification time in numeric Unix time format
/// </summary>
/// <remarks>Octal string representation</remarks>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 12)]
public byte[]? ModifiedTime;
public string? ModifiedTime;
/// <summary>
/// Checksum for header record
/// </summary>
/// <remarks>Octal string representation</remarks>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
public byte[]? Checksum;
public string? Checksum;
/// <summary>
/// Link indicator (file type) / Type flag