mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
Inconsistent behavior on extracting 7zip with wrong password #616
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @idan-weiss on GitHub (Feb 29, 2024).
Hi!
I'm trying to extract 7zip file with password.
I found out that there is inconsistent behavior when I try to use a wrong password:
For a password protected 7zip file, this is the error I get when I use the password
wrong:While this is the error I get when I use the password
asdasd:The described behavior happens when I use:
But when I use this instead, both cases throw the 1st exception:
I have 2 issues with that:
SharpCompress.Compressors.LZMA.DataErrorException, which is internal, so I cannot catch it properly (I must catch non-specific Exception)