Set FilePart properties for directory type
This commit is contained in:
parent
7764684c68
commit
bc3bb2d323
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue