mirror of
https://github.com/rommapp/romm.git
synced 2026-12-03 10:33:22 +01:00
A module-level exception tuple freezes zipfile.BadZipFile, but seven test modules reload the zipfile module, which rebinds the class. After any of them runs, a corrupt archive escaped the handler and surfaced as a raw BadZipFile instead of a 400. Look the class up at raise time instead. NotImplementedError goes with it, being a RuntimeError subclass. Declare each rebuilt entry's final size instead of passing force_zip64, so zipfile marks an entry ZIP64 only when it needs to; a patched ROM handed to a basic unzip implementation was otherwise rejected even though the unpatched archive loaded fine. Drop the extracted and patched intermediates once they are consumed, rather than holding three full-size copies for the life of the download. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>