Skip to content

Fix Windows update file lock - #10

Merged
FaulMit merged 1 commit into
mainfrom
agent/fix-update-file-lock
Aug 2, 2026
Merged

Fix Windows update file lock#10
FaulMit merged 1 commit into
mainfrom
agent/fix-update-file-lock

Conversation

@FaulMit

@FaulMit FaulMit commented Aug 2, 2026

Copy link
Copy Markdown
Owner

What changed

  • close cached-package streams before deleting invalid cache entries
  • close download streams before promoting verified .download files
  • bump Captail to 0.1.5
  • document the one-time manual upgrade required for 0.1.3 and 0.1.4

Root cause

DownloadVerifiedAsync opened the temporary package with FileShare.None and called File.Move before the stream left its await using scope. Windows therefore rejected Captail's own rename with ERROR_SHARING_VIOLATION. The invalid-cache path had the same lifetime issue before File.Delete.

User impact

One-click updates work normally starting with 0.1.5. Users already running 0.1.3 or 0.1.4 must install 0.1.5 manually once because the faulty updater is part of their installed binary.

Validation

  • deterministic update-download regression: download, SHA-256 verification, promotion, corrupt-cache replacement
  • Debug build: 0 warnings, 0 errors
  • Release build: 0 warnings, 0 errors
  • dotnet format --verify-no-changes
  • NuGet transitive vulnerability audit: clean

@FaulMit
FaulMit marked this pull request as ready for review August 2, 2026 17:33
@FaulMit
FaulMit merged commit 551d239 into main Aug 2, 2026
5 of 6 checks passed
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.

1 participant