Set FilePart properties for directory type

This commit is contained in:
Lars Vahlenberg
2023-09-23 14:51:08 +02:00
parent 7764684c68
commit bc3bb2d323

View File

@@ -75,6 +75,8 @@ internal class SevenZipFilePart : FilePart
internal CompressionType GetCompression()
{
if( Header.IsDir ) return CompressionType.None;
var coder = Folder!._coders.First();
switch (coder._methodId._id)
{
@@ -97,5 +99,5 @@ internal class SevenZipFilePart : FilePart
}
internal bool IsEncrypted =>
Folder!._coders.FindIndex(c => c._methodId._id == CMethodId.K_AES_ID) != -1;
Header.IsDir ? false : Folder!._coders.FindIndex(c => c._methodId._id == CMethodId.K_AES_ID) != -1;
}