Skip to content

fix: delete downloaded archive after successful install - #305

Merged
fraa2a merged 1 commit into
mainfrom
fix/download-archive-cleanup
Nov 6, 2026
Merged

fraa2a merged 1 commit into
mainfrom
fix/download-archive-cleanup

Conversation

@fraa2a

@fraa2a fraa2a commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

What changed?

Review finding H6: the downloaded archive was only deleted on a manual "clear list", so it stayed on disk forever after a successful install.

  • cleanup_stage in finalize_install.rs now also deletes <id>.archive and <id>.part from the downloads directory (new remove_download_files helper).
  • A failed delete (other than not found) is logged with application_log::failure and does not fail the install.
  • cleanup_stage also runs from recover_cleanup at startup, so installs interrupted after commit get cleaned too.
  • Every reader of the archive path was checked; none needs it once the job is installed (staging only runs for downloaded, recover_staging only looks at staging rows, remove_entry already ignores a missing file).

No changes to download_queue.rs; no textual conflicts with #301 and #302.

Validation

  • New test install_removes_downloaded_archive; finalize_install and download_queue tests pass; clippy -D warnings and cargo fmt --check clean.
  • Manual install in the running app.
  • No unrelated changes.

Generated by Claude Code

The archive and its partial file were kept until the user cleared the
list. Remove them with the stage cleanup once the install is committed;
a deletion failure is logged and does not fail the install.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DGbCKVdcUfJfjZ93bYY9p3
@fraa2a
fraa2a merged commit 76e826a into main Nov 6, 2026
7 checks passed
@fraa2a
fraa2a deleted the fix/download-archive-cleanup branch November 6, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants