Skip to content

batches: Make sure no corrupted repozips are used

Warren Gifford requested to merge es/no-corrupted-repos into main

Created by: eseliger

When the download of a zip was aborted, it could've left behind a corrupted archive zip. This fixes it by first storing it to a temporary location and then creating the actual file atomically by doing os.Rename.

Closes https://github.com/sourcegraph/sourcegraph/issues/39743

Test plan

Verified things still work as expected.

Merge request reports

Loading