libzipplugin: Prevent crash when canceling archive creation
Usually when canceling zip_close
is running and this can't be stopped, while the job may have killed and destroyed the main object.
Then calling list()
will crash.
This prevents the crash by checking the cancellation state.
We need libzip 1.6 to cancel operations properly (future work) https://libzip.org/documentation/zip_register_cancel_callback_with_state.html
Edited by Méven Car