Open njlr opened 1 year ago
To see if I recreated the issue correctly, if you check if it is a directory before checking the IsEncrypted flag
if not e.IsDirectory then
Does that do anything for you?
This does not crash:
#r "nuget: SharpCompress, 0.33.0"
open SharpCompress
open SharpCompress.Archives
let archive = ArchiveFactory.Open("test.7z")
for e in archive.Entries do
if e.IsDirectory then
printfn $"%A{e} is a directory"
else
printfn $"IsEncrypted %b{e.IsEncrypted}"
Perhaps the error message should be improved?
Can a directory be encrypted?
This was fixed: https://github.com/adamhathcock/sharpcompress/pull/768
Create a
7z
file:Check the entries are encrypted:
Scratch.fsx
It will crash: