Hello, when I extract a rar file with password everything works as expected if the password is ok. However, when the password is wrong the extraction runs without raising any exception and the files are extracted. Of course the files are corrupted. This is the code I am using:
string password = "wrongpass";
string inpath = @"D:\Test\File_with_pass.rar";
RarArchive rar = RarArchive.Open(inpath, SharpCompress.Common.Options.LookForHeader, password);
rar.WriteToDirectory(@"D:\Test\out");
rar.Dispose();
How can I avoid to create corrupted files and detect if the password was entered correctly?