openSUSE / obs-service-set_version

An OBS source service: Update spec file version
GNU General Public License v2.0
5 stars 38 forks source link

obscpio containing zip file raises BadZipFile exception #87

Open StefanBruens opened 10 months ago

StefanBruens commented 10 months ago

The zipfile.is_zipfile unfortunately misclassifies any file which has a zipfile end-of-central-directory header in its last 65kByte as a zipfile:

https://github.com/python/cpython/issues/72680

This is often the case when one of the last files in the obscpio archive is a zip file, or any other file which contains a zip file.

The check should probably ignore any python exceptions, or at least also BadZipFile: https://github.com/openSUSE/obs-service-set_version/blob/d4150d2cf2c80788efd5e9dff6bc4fd033c74a93/set_version#L249-L252