Merge pull request #1443 from adamhathcock/fix/1441-sevenzip-libarchive-attributes

Fix 7z writer attribute interoperability with libarchive
This commit is contained in:
Adam Hathcock
2026-10-13 11:12:10 +01:00
committed by GitHub
2 changed files with 192 additions and 1 deletions

View File

@@ -13,7 +13,9 @@ internal sealed class SevenZipWriteEntry
{
public string Name { get; init; } = string.Empty;
public DateTime? ModificationTime { get; init; }
public uint? Attributes { get; init; }
// Define attributes for files too: libarchive misreads partially defined vectors.
public uint? Attributes { get; init; } = 0x20; // FILE_ATTRIBUTE_ARCHIVE
public bool IsDirectory { get; init; }
public bool IsEmpty { get; init; }
}