Skip to content

Commit

Permalink
Merge pull request #768 from Erior/feature/761
Browse files Browse the repository at this point in the history
Feature/761
  • Loading branch information
adamhathcock committed Sep 25, 2023
2 parents 7764684 + 4fd8c77 commit 6bcaebc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/SharpCompress/Common/SevenZip/SevenZipFilePart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ public CompressionType CompressionType

internal CompressionType GetCompression()
{
if (Header.IsDir)
return CompressionType.None;

var coder = Folder!._coders.First();
switch (coder._methodId._id)
{
Expand All @@ -97,5 +100,7 @@ internal CompressionType GetCompression()
}

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;
}

0 comments on commit 6bcaebc

Please sign in to comment.