Refuse a snapshot that would fill the drive, and clear its leftovers before the space check #164
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ethan-hann/SavePoint#164
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by a resilience review (report kept by the maintainer). GitEngine.Capture.cs:83-85 runs EnsureStorageSpace (100 MiB floor, no extraBytes, GitEngine.cs:103) before BeginWrite, whose cleanup removes leftover tmp_pack files (GitEngine.cs:135-138). A first snapshot of a 90 GB install with 60 GB free fills the drive (if storage is on C:, the game cannot write saves), and the multi-GB leftover makes every retry fail the space check until restart. Fix: run the cleanup first; estimate the new and changed bytes and pass them as extraBytes so the snapshot refuses before writing. Also, LaunchOrchestrator.Start.cs:264-273 switches the install before knowing the saves folder can switch (space, case clashes, links are checked per folder in CheckoutAsync); add a read-only check of both folders first, so a refused second folder never leaves install and saves on different profiles.
Shipped in 0.9.15 (pull request 174).