Skip to content
Snippets Groups Projects

Clean up partially-downloaded ZIP files if aborted

Merged Warren Gifford requested to merge mrn/clean-up-partial-zips into main

Created by: mrnugget

This fixes https://github.com/sourcegraph/sourcegraph/issues/15865

This fixes a bug where src-cli would leave partially-downloaded ZIP files behind when the user hit Ctrl-C while a download was ongoing.

The fetchRepositoryArchive would then run into a context-cancelation error when doing the request or the io.Copy and not clean up the file.

The code here checks whether the cause of the error is a cancelation and, if so, cleans up the zip file.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading