[Plugin] ZipUtility (7zip)

Hey thanks a bunch for this project. I got a basic implementation up in C++ in quite short order. There’s one shortcoming of this plugin and I’d like to ask for some advice on how to structure an improvement.

My use-case is basically generating thumbnails of zipped image archives:

  • Scanning a folder of dozens of archives
  • Getting file contents of archive and sorting by name
  • Unzipping the first file to display as cover art

I’ve noticed that when calling


UZipFileFunctionLibrary::UnzipFileNamedTo

that


InternalCallback

is reset for each call. The result seems to be that if I fire off an unzip operation before an in-progress one completes, I don’t get either of the callbacks and it seems there are some race conditions that cause the file extractions to fail in interesting ways. So while new zip events might fire off on a new thread, I don’t have the ability to queue up more than one at a time.

I’ve only dipped into the project code a bit but am getting more familiar with it. If you have a good idea of how to fix this but don’t have time I’d love to discuss what you think the best approach is to supporting this and perhaps I can send a pull request over.