project-jedi/jcl — pull request #13 by boramis (2014-01-08 20:57:57+00:00)
Title: Sevenzip error handling

This adds a number of enhancements/fixes to JclCompression's 7-zip support. The primary one is the third patch (fb98bd), which replaces all of the HRESULT results with safecall semantics to provide exception safety.

The fourth patch, 8da952d, is the one I'm least happy with. It works and prevents the corruption I experienced, but it feels a bit hacky to me. Our own code is freeing the archive as soon as Compress returns though, so it's possible there's some side effects I didn't notice if you try using it again. In my own testing, trying to re-use an archive after modifying it successfully gave various errors, so it may be a moot point.