mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-12 21:22:26 +00:00
Set FilePart properties for directory type
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user