• Nico Alt's avatar
    Flush file before passing it to next function · 3798a884
    Nico Alt authored
    When downloading a repo index, the downloaded index got written to a
    file with `.write()` in a `with` clause. Before the file got actually
    written to the disk, it got already passed into the next function,
    resulting in a `VerificationException`:
    ```
    JAR signature failed to verify: /tmp/tmppq2r51r0
    jarsigner: java.util.zip.ZipException: zip file is empty
    ```
    
    This behavior got introduced in
    869cc114.
    
    I've found this bug with help of Repomaker's tests: repomaker!215 (comment 148994053)
    3798a884
index.py 31.5 KB