Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

SevenZipExtractor.ExtractArchive called with wrong password hangs onto resources #175

Open
lloydj2ons opened this issue Oct 18, 2022 · 1 comment

Comments

@lloydj2ons
Copy link

Hi,
I am having problems calling the ExtractArchive method with a wrong password. It throws an exception which I handle, however, it seems to hang onto file resources which causes the following test to fail. If I run the following tests on its own, it passes.

The output from the second test when it fails is below:
The next test fails with the following details:
Result StackTrace:
at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel)
at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive)
at System.IO.Directory.Delete(String path, Boolean recursive)
at qob_processor_prototype.test.BaseTests.CleanOutput() in D:\SOURCE_CODE_C#\qob-processor-prototype\qob-processor-prototype\qob-processor-prototype.test\Base.Test.cs:line 74
at qob_processor_prototype.test.BaseTests.Init() in D:\SOURCE_CODE_C#\qob-processor-prototype\qob-processor-prototype\qob-processor-prototype.test\Base.Test.cs:line 17
Result Message: Initialization method qob_processor_prototype.test.ZipTests.Init threw exception. System.UnauthorizedAccessException: Access to the path '7z32.dll' is denied..

Any ideas please?

@lloydj2ons
Copy link
Author

Hi, I think I've solved this one by myself, I found the SevenZipExtractor.Check() method which I can use to check my password before I call the ExtractArchive() method.
Thanks for a great bit of software, really useful :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant